Geolocation


Purpose

The Geolocation API defines a high-level interface to location information delivered by the device, such as latitude and longitude. The API itself is independent of the underlying location information sources, such as GPS and location obtained based on IP address, MAC address, etc.

The object can be accessed using the window.navigator.Geolocation reference.

Module

This object belongs to the Geolocation product module.

Methods

Name Return type Description
getCurrentPosition object

Passes the device's current position. When called, it returns the initial Position object, which describes the device's current location.

watchPosition long

This method returns the watchId value that uniquely identifies a watch operation. Then it asynchronously starts the watch operation, which first attempts to obtain the current location of the device.

clearWatch undefined

When called, it first checks the value of the given watchId parameter. The watch process identified by the watchId is immediately stopped and no further callbacks are invoked.

Related topic

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