My app needs a 100% accurate latitude and longitude. I dont care if the battery gets drained because of the GPS - the need for exact location is a must.
Would this approach work?
First of all i will use the following listner to reciewe data from the gps
Second, I will try to force the phone to use the GPS…
Third, I will fire a custom event when the e.coords.accuracy falls below 10 or is equal.
Question, is this the way to do it - or wont it work? Is there a better solution?
The example in the kitchen sink 'geolocation.js' works fine as a cut and paste.
Yes, i am all aware of the code - but my question is more about "the approach, to attack the problem". We are all aware of the fact that the GPS needs some time to get its current position, and thats why I wonder if the e.coords.accuracy - is the best way to get a hint if the gps is receiving its location?
I'm not sure on your app, but I have one that loads, you click an 'add location' button, and give it a description, and when you save it its already got your gps..