为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

mozzila location service accuracy

more options

Hello,

I am a developer, and in my application I want to access the user's current location, so firstly I tried with the google geolocation API, that is not working with the firefox and other browser except chrome. then I tried https://location.services.mozilla.com/v1/geolocate?key=test this API, this gives me inaccurate lat and long, so please let me know how can I get the accurate user location using the "mozzila location service " if is there any special feature for commercial user then please let me know.


Thanks

Hello, I am a developer, and in my application I want to access the user's current location, so firstly I tried with the google geolocation API, that is not working with the firefox and other browser except chrome. then I tried https://location.services.mozilla.com/v1/geolocate?key=test this API, this gives me inaccurate lat and long, so please let me know how can I get the accurate user location using the "mozzila location service " if is there any special feature for commercial user then please let me know. Thanks

所有回复 (3)

more options

Please see this article: https://developer.mozilla.org/docs/Web/API/Geolocation/Using_geolocation

When a site wants a user to share her precise location, the user typically receives a permission request that drops down from the left end of the address bar. If your code isn't generating that request, then your code is not going to be able to get that information.

more options

Thank for your replay.

I am getting the permission drops down, and I allowed the access my location but it is not working.

https://developer.mozilla.org/docs/Web/API/Geolocation/Using_geolocation

In this link there is an example "Live Result" that gives the accurate my location, but when you access this url in the Firefox browser it will give you an error saying "Unable to retrieve your location"

please have a look in to this issue.

Thanks.

more options

adityacis said

https://developer.mozilla.org/docs/Web/API/Geolocation/Using_geolocation

In this link there is an example "Live Result" that gives the accurate my location, but when you access this url in the Firefox browser it will give you an error saying "Unable to retrieve your location"

So when you try the Live Result link in Firefox, it requests permission first, you give permission, then it fails to determine your location -- but the Live Result demo works in other browsers?

Hmm, is there any reason that Firefox wouldn't have access to your system's data on nearby wi-fi hotspots?