Reputation: 1805
It would be awesome to be able to attach a listener to a change in geolocation.
I haven't been able to find anything commenting on this either on w3 or searching elsewhere. Seems that its obviously not provided at the moment, but is there any planned support for this from any browser or any w3 spec?
Upvotes: 2
Views: 4133
Reputation: 4097
"This method returns a watch ID value then can be used to unregister the handler by passing it to the Geolocation.clearWatch() method." https://developer.mozilla.org/en-US/docs/Web/API/Geolocation.watchPosition
id = navigator.geolocation.watchPosition(success, error, options)
http://dev.w3.org/geo/api/spec-source.html
Upvotes: 4