GPS Geolocation.Watchposition not returning watch ID.

Nick Floersch's Avatar

Nick Floersch

21 Jan, 2013 06:58 PM

I have some code for starting a watch on the GPS so I can draw the user's location as he/she moves around. The following code executes fine in Chrome and gives me a valid watchID value back. In debugging the same code through Mobile Studio a watchID is never returned. Since this works for me already in Chrome and Safari and Firefox, I do not think the problem is my code. It would be awesome to get this working since I can manually update the GPS location from the main control window and then if it was watching correctly, it would update the display in simulated iPad... which would be perfect! The only thing better would be to record routes by drawing them, maybe, and then playback those routes into the simulator's GPS system. Anyway - here is my code that does not work in Electric Mobile Studio.

watchID = navigator.geolocation.watchPosition(showLocation, locationError, {enableHighAccuracy:true, maximumAge:30000, timeout:27000});

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

30 Jun, 2022 03:05 PM
02 Nov, 2021 04:52 AM
16 Oct, 2021 02:38 PM
06 Oct, 2021 05:12 AM
20 Sep, 2021 04:14 PM