在线地图定位器 API(如 GPS)
谷歌地图、IP 位置等工作良好。
但这些服务都无法准确定位计算机在地图上的位置。
任何人都知道任何可以在地图上定位计算机而无需用户输入的 api。
我厌倦了 IP 位置,它一点也不准确,我的客户不高兴。 :(
谢谢 戈壁
Google maps, ip location etc. working good.
But none of the services are locating a computer exactly where it is on a map.
Anyone know any api which can locate a computer on a map without user inputs.
I am tired of ip location, it is not at all exact and my client is not happy. :(
Thanks
Gobi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果没有专门的硬件,您想要做的事情是不可能的。没有 GPS 的手机上的谷歌地图使用手机信号塔站信息。大多数其他手机使用实际的 GPS 接收器。如果没有这些,您的网络连接计算机判断其所在位置的唯一方法就是查看谁拥有其 IP 地址,这就是 IP 定位功能的作用。不幸的是,该数据库的地理分辨率相当低。如果您确实想要准确且精确的位置信息,您必须拥有 GPS 接收器。
What you're trying to do is not possible without specialized hardware. Google maps on cell phones without GPS uses cell tower station information. Most other phones use actual GPS receivers. With neither of those, the only way for your network-attached computer to tell where it is is by looking at who owns its IP address, which is what the IP location stuff does. Unfortunately, that database has pretty low geographical resolution. If you really want accurate and precise location information, you have to have a GPS receiver.
除非您将某些 GPS 设备连接到计算机,否则无法完成此操作。但我猜许可证中禁止在谷歌地图中使用实时跟踪,但我可能是错的。
This cant be done unless you have some GPS device connected to the computer. But I guess it is forbidden in the licence to use real time tracking in Google Maps, but I might be wrong.
还有一种方法,但不知道实用性如何:可见的wifi网络。如果您的电脑有 WiFi 硬件,那么您通常可以根据网络和位置数据库将您可以看到的网络列表与大致位置相关联。这就是 iPod touch 和 iPhone 在建筑区 GPS 接收质量较差时进行自我定位的方式。
但即使你的最终用户有 WiFi 硬件,并且你可以以某种方式从中读取网络列表,但我不确定是否有这方面的公共数据集。
There's one more way, but I don't know how practical it is: visible wifi networks. If your PC has wifi hardware then you can often correlate the list of networks that you can see to an approximate location based on databases of networks and position. This is how e.g. iPod touches can locate themselves, and iPhones when there's poor GPS reception in built-up areas.
But even if your end-user has wifi hardware and you can somehow read the network list from it then I'm not sure if there are public datasets for this though.
W3C 地理定位 API 允许网站向用户请求最佳可用位置浏览器。在某些情况下,这将使用您已经发现不准确的 IP 地理定位,但有时它可以做得更好。
API 与设备以及用于获取位置的方法无关;在 iPhone 上,地理定位 API 可能会使用蜂窝塔三角测量、可用的 WiFi 网络查找或 GPS 卫星地理定位,或某种组合。在笔记本电脑上的 Firefox 或 Chrome 上,Google 使用 WiFi 网络和 IP 地址来提供位置,这通常比单独使用 IP 地理定位要好得多。
如果您的计算机上连接了 GPS,那么您的浏览器也可能会利用它 - 预计 Internet Explorer 的未来版本将支持使用 Windows 7 定位平台的 W3C 地理定位 API,该平台可以接受来自附加 GPS 或手动输入或其他一些插件。
The W3C Geolocation API allows websites to request the user's best available location from the browser. In some cases this will use IP geolocation which you've already seen to be inaccurate, but it can sometimes do better.
The API is agnostic to the device and the method used to obtain location; on an iPhone, the Geolocation API may use cell tower triangulation, available WiFi network lookup or GPS satellite geolocation, or some combination. On Firefox or Chrome on the laptop, Google uses WiFi networks and IP address to give a location which is often much, much better than IP geolocation alone.
If you had a GPS attached to your computer, it's possible that your browser could take advantage of that too -- it's expected that future versions of Internet Explorer will support the W3C Geolocation API using the Windows 7 Location Platform, which can accept location from an attached GPS or manual entry or some other plugin.