We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

לאתר זה תהיה פונקציונליות מוגבלת בזמן שאנו מתחזקים אותו לשיפור החוויה שלך. אם מאמר מסויים לא פותר את הבעיה שלך וברצונך לשאול שאלה, קהילת התמיכה שלנו מחכה לעזור לך ב־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?