我使用此代码,以获得准确的用户的位置...如何获取用户当前位置的最大精度
watchID=navigator.geolocation.watchPosition(handleGetCurrentPosition, handleGetCurrentPositionError, {enableHighAccuracy:true});
function handleGetCurrentPosition(location)
{
document.getElementById("lat").value = location.coords.latitude;
document.getElementById("lon").value = location.coords.longitude;
document.getElementById("accu").value =location.coords.accuracy;
document.forms["myform"].submit();
}
function handleGetCurrentPositionError(){
alert("Location could not be found.")
}
BT的结果我得到是不准确的。 我使用的代码是否存在任何问题?
你对“准确”的定义是什么? – acme