PositionOptions


Purpose

This object is a container for configuration attributes passed to the Geolocation API. It is one of the parameters of either the getCurrentPosition or watchPosition methods.

Attributes

Name Description Type
enableHighAccuracy Denotes that the best possible results are expected. Setting it to "true" may result in slower response times and/or increased power consumption. By default this parameter is set to "false". boolean
timeout Denotes the maximum length of time (in milliseconds) allowed to pass from the call of the getCurrentPosition or watchPosition methods until a successCallback is invoked. If it is impossible to acquire the position before the timeout elapses, and no other errors occur, an errorCallback is invoked to pass a PositionError object, whose code attribute is set to TIMEOUT. By default it is set to infinity. long
maximumAge Denotes that the application accepts a cached position, whose age is no greater than the specified time (in milliseconds). Setting this parameter to 0 means that the getCurrentPosition or watchPosition methods invoke the appropriate callback to return a new position object immediately. Setting this parameter to infinity means that a cached position is returned, regardless of its age. By default it is set to 0. long

Related topics

Geolocation
Public API reference
Legal notice | Copyright © 2017 and Confidential to Pegasystems Inc. All rights reserved
PDN | Feedback
Advanced...