Bad accuracy using Windows system API with navigator.geolocation.getCurrentPosition
Categories
(Core :: DOM: Geolocation, defect)
Tracking
()
People
(Reporter: ydobrovolskii, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
Steps to reproduce:
From version 65 firefox returns coords with low accurency (4 digits after comma), even in v.65.0.2 (x64) Windows 10 which should cointains fix.
Tested with js: navigator.geolocation.getCurrentPosition(function(oPosition) {console.log(oPosition.coords)}); and by additional resource https://www.w3schools.com/HTML/tryit.asp?filename=tryhtml5_geolocation
Actual results:
{ latitude: **.2525, longitude: **.8425, altitude: 0, accuracy: 9149, altitudeAccuracy: 0, heading: null, speed: null }
Expected results:
Tested in v64.0.2:
{ latitude: **.2146561, longitude: **.920443, altitude: null, accuracy: 875, altitudeAccuracy: null, heading: null, speed: null }
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 1•6 years ago
|
||
Firefox navigator.userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Do you have Windows geolocation enabled? (at the OS system)
Reporter | ||
Comment 3•6 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #2)
Do you have Windows geolocation enabled? (at the OS system)
Yes, and looks like it's a problem. After I changed this option - I had a good result.
Now with enabled this option I have bad accuracy result even in Firefox v66.
However its just for FF, for example Chrome show different result.
Reporter | ||
Comment 4•6 years ago
|
||
So in total:
If windows location is ON - accuracy is not good in FF
If it is off - it is good, as expected latitude: *.2146561, longitude: *.920443
What is the reason of so strange behavior?
Comment 5•6 years ago
|
||
By using the windows api, it uses a different geolocation database, the one from Microsoft.
If you try with edge, it should return the same coordinates.
Reporter | ||
Comment 6•6 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #5)
By using the windows api, it uses a different geolocation database, the one from Microsoft.
If you try with edge, it should return the same coordinates.
So Chrome avoid this settings and take results from their own db, or they are compare accuracy to get the best result?!
Isn't its the bes way for FF too? Because it's a little wierd see my position on map with 9km offset...
BTW Edge now return the same result, not sure about Edge with chromium.
Comment 7•6 years ago
|
||
(In reply to ydobrovolskii from comment #6)
(In reply to Sylvestre Ledru [:sylvestre] from comment #5)
By using the windows api, it uses a different geolocation database, the one from Microsoft.
If you try with edge, it should return the same coordinates.So Chrome avoid this settings and take results from their own db, or they are compare accuracy to get the best result?!
Chrome uses Google's own geolocation database.
Isn't its the bes way for FF too? Because it's a little wierd see my position on map with 9km offset...
The problem you found was that Firefox was trying to use Windows's geolocation database, which returned only an approximate location instead of a precise location because Windows' location privacy setting was enabled (by default).
BTW Edge now return the same result, not sure about Edge with chromium.
Edge uses Microsoft's geolocation database. I expect Microsoft's Chromium-based Edge will also use Microsoft's geolocation database (because they won't want to pay to use Google's database when they have their own).
Mozilla has an experimental geolocation database of its own. You can test it by changing two about:config
settings and restarting Firefox:
geo.provider.ms-windows-location
= false
geo.wifi.uri
= https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%
Updated•6 years ago
|
AFAIK we have no plans to address native geolocation provider issues.
Description
•