地理位置不适用于Firefox [英] geolocation doesn't work with Firefox
问题描述
var options = {
enableHighAccuracy:true,
timeout:2000,
maximumAge:100
};
navigator.geolocation.getCurrentPosition(localizeMe,errorLocalize,options);
在回调localizeMe上,我做了一些成功的事情,而errorLocalize显示一个警告,当这个代码doesn 't work。
当我在Chrome上试用这段代码时,没关系,我没有问题。但在Firefox上,我总是有我的警告错误,当我试着这个代码,回调错误总是调用...你有什么想法吗?
地理定位在Firefox和Linux和Mac上已经被打破了,我相信,从v24开始。
Ubuntu有一个bug: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug / 1231273
So, i use this code :
var options = {
enableHighAccuracy: true,
timeout: 2000,
maximumAge: 100
};
navigator.geolocation.getCurrentPosition(localizeMe, errorLocalize, options);
On the callback localizeMe, i do some success things, and errorLocalize show me an alert when this code doesn't work.
When i try this code on Chrome, it's ok, i haven't problem. But on firefox, i always have my alert error when i'm trying this code, the callback error is always call... Do you have any ideas ?
geolocation has been broken on Firefox, on Linux and Mac, I believe, since v24.
There's an bug against Ubuntu here: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1231273
这篇关于地理位置不适用于Firefox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!