Increase IE 11 Geolocation Accuracy

I have a google map (v3) on the website. When the user clicks on the page, I read the geolocation from her browser (if supported):

navigator.geolocation.getCurrentPosition(successCallback, errorCallback, {enableHighAccuracy: true, timeout: timeOut, maximumAge: maximumAge })

      

The feature works, but not always as expected. In Google Chrome it works great - the getCurrentPosition function returns a coordinate object with latitude and longitude as floating points (decimal places). Curiously, this is different in IE11. It also returns a coordinate object, but here both the latitude and longitude are in integers, which means the accuracy is very poor and doesn't really show the correct position on the map.

This is mistake? And does anyone know if this can be fixed?

Thank!

+3


source to share


1 answer


Different browsers use different geolocation providers to get an estimate of your location, and this may explain why you see different results from Google Maps.

Google Chrome uses Google's geolocation services in a similar way. The default geolocation service provider for Firefox is Google Geolocation Services . Safari uses the Skyhook Wireless service .



Searching the web, I couldn't find which particular geolocation provider is using, but the different results you see between browsers can be attributed to the quality of the data provided by the geolocation provider. So my guess is that you need to wait for the accuracy of the geolocation calculation in IE to improve as I haven't seen a documented way to change the geolocation service provider used by the browser. Alternatively, see if Bing Maps works well in IE, or try using a commercial IP-based geolocation discovery service like Maxmind to find coordinates.

+4


source







All Articles