What is the most stable way to use a browsers (Firefox, iPhone's Safari, Android) navigator.geolocation functionality?
Both navigator.geolocation.getCurrentPosition and navigator.geolocation.watchPosition seems unstable, they some times ends up in success callback and sometimes ends up in error callback and I cannot see the reason.
I'm now using:
navigator.geolocation.getCurrentPosition(function (position) {
console.debug(position);
}, function(data) {
console.debug(data);
},
{
enableHighAccuracy: true,
maximumAge: Infinity,
timeout: 10000
});
Is there any JavaScript framework that makes reading geolocation (cross browser) more stable.
What is it that is causing the instability, something in the browsers core?
I have had problems in Firefox (Ubuntu, Mac), Chrome (Mac), Safari (Mac), iPhone. Chrome for Ubuntu seems to be working alright.
Please share on how you have implemented geolocation in your project or any ideas on how to improve the quality of the readings.