地理位置不适用于Firefox [英] geolocation doesn't work with Firefox

查看:146
本文介绍了地理位置不适用于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屋!

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