Version: Smart Feature Phone 3.0

navigator.geolocation

Description#

The Geolocation interface represents an object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location. Notice that 'geolocation' permission is required for packaged app to use Geolocation API. (i.e. The developer must add the permisson to the manifest.webapp)

An object with this interface is obtained using the navigator.geolocation property implemented by the Navigator object.

Properties#

The Geolocation interface neither implements, nor inherits any property.

Methods#

The Geolocation interface doesn't inherit any method.

  • navigator.geolocation.watchPosition Determines the device's current location and gives back a Position object with the data.
  • navigator.geolocation.clearWatch Removes the particular handler previously installed using watchPosition().
  • navigator.geolocation.getCurrentPosition Get the current position once time.

Example#

TBD