我正在使用此代码来获取准确的用户位置...
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 我得到的结果不准确。我使用的代码有问题吗?