关闭ios弹出框:“would like to use your current location”

图一:

关闭ios弹出框:“would like to use your current location”

图二:

关闭ios弹出框:“would like to use your current location”

使用cordova生成ios项目,首次打开获取用户定位时会弹出两次对话框,关闭图二中对话框方法:

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
navigator.geolocation.getCurrentPosition(onSuccess, onError);
}

参考:Location permission alert on iPhone with PhoneGap

上一篇:CDN图解(秒懂+史上最全)


下一篇:JAVA框架 Spring 入门