我正在使用最新的Firefox 30.0版本,而navigator.geolocation.getCurrentPosition
在Chrome中可以正常使用,但在这个版本的Firefox中无法使用。
以下是我的代码:
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(GEOprocess, GEOdeclined);
}else{
alert('Your browser sucks. Upgrade it.');
}
function GEOdeclined(error) {
alert('Error: ' +error.message);
}
function GEOprocess(position) {
alert('it works');
}
我遇到了这个错误:
Error: Unknown error acquiring position
注意:升级Firefox到版本30.0后它停止工作了。