GPS Geolocation.Watchposition not returning watch ID.
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});
Keyboard shortcuts
Generic
? | 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