Why is IE9 geolocation support broken compared to other browsers?

做~自己de王妃 提交于 2019-11-28 08:22:41

问题


I'm building a map application and have noticed that although IE9 supports the geolocation api it incorrectly calculates the latitude/longitude.

Other users have also noticed this http://social.technet.microsoft.com/Forums/en-IE/ieitprocurrentver/thread/aea4db4e-0720-44fe-a9b8-09917e345080, but no amount of googling brings up any results from developer blogs/more technical readers... which I find just bizarre, is no one testing their geolocation code in IE9!?

Here is my example code: https://gist.github.com/1710256

Does anyone here know why this would be because it makes feature detecting the geolocation api damn near impossible. Also, I noticed that the fallback (as provided in Paul Irish's polyfill) also has the same issues as found in IE9's native implementation?

Has anyone else experienced this issue with geolocation on IE9?

Any help/advice appreciated.


回答1:


According to this page Firefox uses Google Location Services:

How does it work?

When you visit a location-aware website, Firefox will ask you if you want to share your location.

If you consent, Firefox gathers information about nearby wireless access points and your computer’s IP address. Then Firefox sends this information to the default geolocation service provider, Google Location Services, to get an estimate of your location. That location estimate is then shared with the requesting website.

And according to this page Internet Explorer (rather predictably) uses Microsoft Location Services:

If you allow, Internet Explorer will approximate your location with the help of the Microsoft Location Service

The difference in the reported location will be due to the differences in the underlying databases, for example the Google database may list a WiFi point or IP address that the Microsoft one doesn't (or visa versa).

I can't find any information about changing the location provider for IE, and although Firefox does appear to have provisions for alternative providers I can't at this moment see how to change it.

Note that for me Internet Explorer actually reports my location more accurately (both browsers get my location correctly, however in IE the error radius is around 10 miles whereas in Firefox its around 20 miles).



来源:https://stackoverflow.com/questions/9079236/why-is-ie9-geolocation-support-broken-compared-to-other-browsers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!