与其他浏览器相比,为什么 IE9 地理定位支持被破坏? [英] Why is IE9 geolocation support broken compared to other browsers?

查看:27
本文介绍了与其他浏览器相比,为什么 IE9 地理定位支持被破坏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个地图应用程序,并注意到虽然 IE9 支持地理定位 api,但它错误地计算了纬度/经度.

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

其他用户也注意到了这一点 http://social.technet.microsoft.com/Forums/en-IE/ieitprocurrentver/thread/aea4db4e-0720-44fe-a9b8-09917e345080,但没有多少谷歌搜索可以从开发者博客中找到任何结果/更多技术读者...我觉得很奇怪,没有人在 IE9 中测试他们的地理定位代码!?

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!?

这是我的示例代码:https://gist.github.com/1710256

这里有没有人知道为什么会这样,因为它使检测地理定位 api 的功能几乎不可能.另外,我注意到回退(如 Paul Irish 的 polyfill 中提供的)也有与 IE9 的本机实现中发现的相同的问题?

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?

还有其他人在 IE9 上遇到过这个地理定位问题吗?

Has anyone else experienced this issue with geolocation on IE9?

任何帮助/建议表示赞赏.

Any help/advice appreciated.

推荐答案

根据本页Firefox 使用 Google 位置服务:

According to this page Firefox uses Google Location Services:

它是如何工作的?

当您访问位置感知网站时,Firefox 会询问您是否想要分享你的位置.

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

如果您同意,Firefox 会收集有关附近无线网络的信息接入点和您计算机的 IP 地址.然后 Firefox 发送这个向默认地理位置服务提供商 Google 提供信息位置服务,以估算您的位置. 该位置然后将估算值与请求网站共享.

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.

并根据此页面 Internet Explorer(相当可预测)使用 Microsoft 定位服务:

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

如果您允许,Internet Explorer 将借助 Microsoft 定位服务估算您的位置

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

报告位置的差异是由于基础数据库的差异,例如 Google 数据库可能会列出 Microsoft 没有的 WiFi 点或 IP 地址(反之亦然).

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).

我找不到任何有关更改 IE 位置提供程序的信息,尽管 Firefox 似乎确实提供了替代提供程序的规定,但我目前不知道如何更改它.

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.

请注意,对于我来说,Internet Explorer 实际上更准确地报告了我的位置(两种浏览器都正确获取了我的位置,但是在 IE 中错误半径约为 10 英里,而在 Firefox 中约为 20 英里).

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).

这篇关于与其他浏览器相比,为什么 IE9 地理定位支持被破坏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆