This module allows reading geolocation information from the device. Your app can poll for the current location or subscribe to location update events.
Exponent.Location.getCurrentPositionAsync(options)Get the current position of the device.
options (object) —
A map of options:
Returns an object with the following fields:
coords (object) — The coordinates of the position, with the following fields:
Exponent.Location.watchPositionAsync(options, callback)Subscribe to location updates from the device.
options (object) —
A map of options:
callback (function) —
This function is called on each location update. It is passed exactly one parameter: an object with the following fields:
coords (object) — The coordinates of the position, with the following fields:
Returns a subscription object, which has one field:
© Copyright 2017, Exponent. Created using Gatsby.