BUI logo BBjGeolocation::setTimeout

Description

In BBj 11.0 and higher, this method sets the timeout option for use in subsequent requests for geolocation information.

Syntax

Return Value

Method

void

setTimeout(double timeout)

Parameters

Variable

Description

timeout

Specifies the timeout value in seconds.

Return Value

None.

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 attribute. The timeout attribute only applies to the location acquisition operation.  

Example

rem ' BBjGeolocation::setTimeout

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

See Also

Geolocation API Specification

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