The Geolocation API extends the web spec: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation
As a browser polyfill, this API is available through the
global - you do not need to
You need to include the
in Info.plist to enable geolocation when using the app. Geolocation is
enabled by default when you create a project with
In order to enable geolocation in the background, you need to include the 'NSLocationAlwaysUsageDescription' key in Info.plist and add location as a background mode in the 'Capabilities' tab in Xcode.
To request access to location, you need to add the following line to your
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Android API >= 18 Positions will also contain a
mocked boolean to indicate if position
was created from a mock provider.
Invokes the success callback once with the latest location info. Supported options: timeout (ms), maximumAge (ms), enableHighAccuracy (bool) On Android, if the location is cached this can return almost immediately, or it will request an update which might take a while.
Invokes the success callback whenever the location changes. Supported options: timeout (ms), maximumAge (ms), enableHighAccuracy (bool), distanceFilter(m)
You can edit the content above on GitHub and send us a pull request!