即使在允许浏览器控制位置之后,也总是要对getCurrentPosition进行错误回调
if(navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(getLatLong,noLocation,{enableHighAccuracy: true});
}
}
function getLatLong(pos)
{
lat1=pos.coords.latitude;
long1=pos.coords.longitude;
}