I just tested Geolocation on Firefox 3.6 and iPhone Safari (os 3.1.3), the result is interesting, firefox is more accurate than safari. any one got idea how to make iPhone Safari result more accurate.
Testing Resul
- Windows Vista Firefox 3.6: ------------- Accuracy: 150
- iPhone 3G (os 3.1.3) Safari: ----------- Accuracy: 828
this is the code for testing:
navigator.geolocation.getCurrentPosition(handler, {enableHighAccuracy: true});
function handler(location) {
var message = document.getElementById("message");
message.innerHTML = "<img src='http://maps.google.com/staticmap?sensor=true&center=" + location.coords.latitude + "," + location.coords.longitude + "&size=300x300&maptype=street&zoom=16&key=ABQIAAAAZrVtlT2df2pkfI_RZB_6WBRWTAkRKJS7h1XjKaOTqACHuw1n0BT5cATkkKFnZNGHmrwUw9IilQK0Eg' />";
message.innerHTML+="<p>Longitude: " + location.coords.longitude + "</p>";
message.innerHTML+="<p>Latitude: " + location.coords.latitude + "</p>";
message.innerHTML += "<p>Accuracy: " + location.coords.accuracy + "</p>";
// call the function with my current lat/lon
getPlaceFromFlickr(location.coords.latitude, location.coords.longitude, 'output');
}
. .