Any components in moxie-js-client can access the users location data through two different APIs found in the
Follow/Unfollow - subscribe to updates¶
- callback (function) – a callback to be called each time the user position updates.
Start listening to user position updates.
- callback (function) – the callback already registered you want to remove from the listener
Stop listening to user position updates.
getLocation - one shot accurate position¶
- callback (function) – a callback to be called once a good enough position has returned from the navigator APIs or the timeout has fired.
- options (object) – Optional paramters passed in this object include,
errorMarginspecify in meters how accurate a response you want returned by getLocation. Also a
timeoutin ms how long should getLocation wait before returning the most recent result which didn’t meet the
Uses the phones most accurate capabilities to get a good position result within the specified paramaters.