Page 1 of 1
geoLocation clearWatch
Posted: Mon Oct 29, 2012 4:31 pm
by Matt
What is the best way to clear (turn off) a watch on the geolocation service? The phonegap documentation shows a watchID that is returned when you invoke the service. How do I get access to that variable and call clearWatch?
Thanks much!
Matt
geoLocation clearWatch
Posted: Mon Oct 29, 2012 7:38 pm
by maxkatz
Have you tried setting a default value (to turn off) for watchPosition in mapping?
geoLocation clearWatch
Posted: Mon Oct 29, 2012 9:00 pm
by Matt
Thank you for the response. I can set this either on or off, but I would like to be able to toggle it from javascript.
Thank you,
Matt
geoLocation clearWatch
Posted: Mon Oct 29, 2012 10:37 pm
by maxkatz
If you need programmatic access to this component, or basically the PhoneGap API, I'd suggest to invoke the API directly. This way you will have full access to all methods and properties.