【发布时间】:2014-08-13 02:08:00
【问题描述】:
我使用的是 Firefox 30.0(最新的 FF),navigator.geolocation.getCurrentPosition 在 Chrome 中工作,但在这个版本的 FF 中没有。
这是我的代码:
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 版后停止工作
【问题讨论】:
标签: firefox geolocation navigator