2
当第一次尝试在iPhone上获取地理位置时 - 我拒绝了。 每个其他时间我想(在页面的另一重装)的位置,我没有得到任何响应(没有错误和没有成功):用户不允许地理位置 - 第二次通知用户
navigator.geolocation.getCurrentPosition(
function (location) {
ig_location.lat = location.coords.latitude;
ig_location.lng = location.coords.longitude;
alert('got it!');
},
function(PositionError) {
alert('failed!' + PositionError.message);
}
);
有没有办法每次我失败时通知用户获取位置?
(我不需要使用watchPosition ...)
感谢您的回答。 为其他人寻找实际的文件 - 它在:http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CoreLocation_Framework/CoreLocation_Framework.pdf – Dror 2010-03-19 06:23:23