我刚刚在Firefox 3.6和iPhone Safari(os 3.1.3)上测试了Geolocation,结果很有趣,firefox比safari更准确。任何人都知道如何使iPhone Safari的结果更准确。地理位置Firefox比iPhone Safari准确吗?
测试Resul
- Windows Vista中的Firefox 3.6:-------------精度:150
- iPhone 3G(OS 3.1.3)Safari浏览器: - ---------精度:828
这是用于测试的代码:
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¢er=" + 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');
}
。 。
重点您的问题多一点。你在测试什么平台,结果如何?每个浏览器使用哪些位置服务(手机信号塔三角测量,GPS,IP等)。 SafariMobile的精度是否不符合您的期望?你对什么样的准确性感兴趣? – 2010-03-19 02:44:10
刚刚更新测试结果,我正在寻找在正确的郊区定位,Safari浏览器不会返回正确的郊区,Firefox。 不知道每个浏览器使用什么位置服务,可能会做更多的研究,欢呼。 – johnz 2010-03-19 03:32:44