Firefox 5,地理定位和“不是现在"问题 [英] Firefox 5, Geolocating and "Not Now" Issue
本文介绍了Firefox 5,地理定位和“不是现在"问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有人必须处理并设法找到可行的解决方法来解决我在以下错误报告中发布的 Firefox 5 地理定位问题.链接到报告比在这里重新描述更容易.
Has anyone out there had to deal with and managed to find a viable workaround for the Firefox 5 geolocation issue I posted in the following bug report. It's easier to link to the report than re-describe it here.
https://bugzilla.mozilla.org/show_bug.cgi?id=675533
当然,我不是这个星球上唯一被咬过的人.
Surely I'm not the only one on the planet this has bitten.
推荐答案
我可能有点晚了,但希望我能帮助别人.我的解决方法是基于延迟通话.如果延迟呼叫触发时没有修复,我会怀疑:)
I might be a bit late but hope I can help others. My workaround is based on a delayed call. If there is no fix when the delayed call is fires, I become suspicious :)
var timeIsPassig = false;
function anyThing(){
timeIsPassig = true;
setTimeout(
function(){
if (timeIsPassig) {
timeIsPassig = false;
console.log("Waiting too much... Or did you say not now? :-P");
}
},
10000
);
navigator.geolocation.getCurrentPosition(
function (pos) {timeIsPassig = false; /* rest of positioning*/},
function (err) {timeIsPassig = false; /* rest of error handling*/},
{maximumAge: 30000, timeout: 10000, enableHighAccuracy: true}
)
}
这篇关于Firefox 5,地理定位和“不是现在"问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文