Firefox 5,地理定位和“不是现在”问题 [英] Firefox 5, Geolocating and "Not Now" Issue

查看:118
本文介绍了Firefox 5,地理定位和“不是现在”问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人需要处理,并设法找到一个可行的解决方法,我发布在下面的错误报告中的Firefox 5地理定位问题。链接到报告比在这里重新描述要容易。



https://bugzilla.mozilla.org/show_bug.cgi?id=675533



当然,我不是只有一个人在这个星球上被咬了。

解决方案

我可能有点迟,但希望我能帮助别人。
我的解决方法是基于延迟的调用。如果在延迟的调用触发时没有修复,我会变得可疑:)

pre $ var timeIsPassig = false;

函数anyThing(){
timeIsPassig = true;
setTimeout(
function(){
if(timeIsPassig){
timeIsPassig = false;
console.log(Waiting too much ... or you say不是现在?:-P);
}
},
10000
);
navigator.geolocation.getCurrentPosition(
function(pos){timeIsPassig = false; / * rest of positioning * /},
function(err){timeIsPassig = false; / * rest of error处理* /},
{maximumAge:30000,timeout:10000,enableHighAccuracy:true}

}


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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆