Matt
Posts: 0
Joined: Tue Oct 16, 2012 7:26 pm

geoLocation clearWatch

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

geoLocation clearWatch

Have you tried setting a default value (to turn off) for watchPosition in mapping?

Matt
Posts: 0
Joined: Tue Oct 16, 2012 7:26 pm

geoLocation clearWatch

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

geoLocation clearWatch

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.

Return to “Issues”