使用GeoLocation API获取地理位置:
navigator.geolocation.getCurrentPosition(GetLocation);
function GetLocation(location) {
alert(location.coords.latitude);
alert(location.coords.longitude);
alert(location.coords.accuracy);
}
使用GeoLocation API获取地理位置:
navigator.geolocation.getCurrentPosition(GetLocation);
function GetLocation(location) {
alert(location.coords.latitude);
alert(location.coords.longitude);
alert(location.coords.accuracy);
}