Currently, there's no way to stop watching a users location. This is done by calling navigator.geolocation.clearWatch(id) (https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/clearWatch). However, the watchPosition id is not currently being stored, so there is no id to use for clearing it.
It would then be convenient to round out the API with a public method to stopping tracking the location. The method would just need to call clearWatch with the stored watchPosition id.
Currently, there's no way to stop watching a users location. This is done by calling
navigator.geolocation.clearWatch(id)
(https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/clearWatch). However, thewatchPosition
id is not currently being stored, so there is no id to use for clearing it.The
watchPosition
id is returned from thenavigator.geolocation.watchPosition
method (https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition), so the return value could be stored on the service (https://github.com/igorpreston/ember-cli-geo/blob/c68a1d54ea6d96e2e5262f68613ed91e63a6df3b/addon/services/geolocation.js#L22).It would then be convenient to round out the API with a public method to stopping tracking the location. The method would just need to call
clearWatch
with the storedwatchPosition
id.