BUI logo BBjGeolocation::getTimeout

Description

In BBj 11.0 and higher, this method returns the timeout option that will be used in subsequent requests for geolocation information.

Syntax

Return Value

Method

double

getTimeout()

Parameters

None.

Return Value

Returns the timeout value in seconds that will be used in subsequent requests for geolocation information.

Remarks

The "timeout" attribute denotes the maximum length of time (expressed in seconds) that is allowed to pass from the call to getCurrentPosition() or watchPosition() until the browser returns a position. If the implementation is unable to successfully acquire a new position before the given timeout elapses, and no other errors have occurred in this interval, then a BBjGeolocationEvent is returned with getStatus()=3 (TIMEOUT). Note that the time that is spent obtaining the user permission is not included in the period covered by the timeout attributes. The timeout attribute only applies to the location acquisition operation.

Example

rem ' BBjGeolocation getTimeout

sysgui! = bbjapi().openSysGui("X0")
geo! = sysgui!.getGeolocation()
geo!.setTimeout(30)
timeout = geo!.getTimeout()
i = msgbox("getTimeout: "+str(timeout),0,"BBjGeolocation")
release

See Also

Geolocation API Specification

BBj Object Diagram for an illustration of the relationship between BBjObjects.