BUI logo BBjGeolocation::setMaximumAge

Description

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

Syntax

Return Value

Method

void

setMaximumAge(double maximumAge)

Parameters

Variable

Description

maximumAge

Specifies the maximum age in seconds of any cached position (0 to acquire a current position).

Return Value

None.

Remarks

The maximumAge attribute indicates that the application is willing to accept a cached position whose age is no greater than the specified time in seconds. If maximumAge is set to 0, the implementation must immediately attempt to acquire a new position object. If an implementation does not have a cached position available whose age is no greater than the specified maximumAge, then it must acquire a new position object. In case of a watchPosition(), the maximumAge refers to the first position object returned by the implementation.

Example

rem ' BBjGeolocation::setMaximumAge

sysgui! = bbjapi().openSysGui("X0")
geo! = sysgui!.getGeolocation()
geo!.setMaximumAge(30)
maximumAge = geo!.getMaximumAge()
i = msgbox("getMaximumAge: "+str(maximumAge),0,"BBjGeolocation")
release

See Also

Geolocation API Specification

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