谷歌地理定位 API 库
是否有一个图书馆可以使用谷歌服务(https://www.google .com/loc/json)?
Google Gears 支持此功能,如下所述 http://code.google.com/p/ gears/wiki/GeolocationAPI 在 Web 服务请求/响应模式上也有很好的 doco。
Firefox 和 iPhone Safari 也使用该服务,并且它们有自己的实现。我想在我自己的 C# 应用程序中使用该服务,因此我想要一个可以使用的库(C/C++/C# 之一)。目前,我的同事让它工作的唯一方法是使用 IE 的 gears 插件并在我们的 WPF 应用程序中托管嵌入式 IE 窗口。这有点麻烦并且可重新分发性很差。
有什么想法吗?
编辑这是来自上述页面的评论:
[电子邮件受保护]发表的评论,2008 年 12 月 2 日
感谢大家的评论。一些回应...
有关使用 API 的许多问题的答案可以在 Geolocation >API 文档中找到,网址为 http://code.google.com/apis/gears/api_geolocation.html。此 Wiki 页面旨在记录 Gears 开发人员正在进行的工作,而不是作为 API 的权威文档。
关于 JSON 协议,我更新了此文档以反映 Gears 中的当前行为。请注意,该协议的官方文档很快就会添加到 Geolocation API 文档中。
Gears 服务条款禁止直接使用 Google 位置服务器 (http://www.google. com/loc/json)通过 HTTP 请求。该服务只能通过 Geolocation API 访问。
这有点糟糕。那么 Firefox 是如何通过 HTTP 请求直接使用该服务的呢?
Is there a library out there that will get you your approximate location using the google service (https://www.google.com/loc/json)?
Google Gears has support for it as described here http://code.google.com/p/gears/wiki/GeolocationAPI There is also good doco on the web service request/response schema.
Firefox and iPhone Safari use the service as well and they have their own implementations. I would like to use the service in my own C# application so I would like a library that I can use (either one of C/C++/C#). Currently the only way my colleague got it working is using a gears plugin for IE and hosting the embedded IE window in our WPF app. This is a bit cumbersome and poorly re-distributable.
Any ideas?
Edit This is a comment from the above page:
Comment by [email protected], Dec 02, 2008
Thanks for all the comments. A few responses ...
Answers to many of the questions about use of the API can be found in the Geolocation >API documentation at http://code.google.com/apis/gears/api_geolocation.html. This Wiki page is intended to document work in progress for those developing Gears, not to serve as definitive documentation of the API.
Regarding the JSON protocol, I've updated this document to reflect the current behaviour in Gears. Note that official documentation of the protocol will soon be added to the Geolocation API documentation.
The Gears Terms of Service prohibits direct use of the Google location server (http://www.google.com/loc/json) via HTTP requests. This service may only be accessed through the Geolocation API.
This kinda sucks. So how does Firefox gets away using this service directly via a HTTP request.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请看一下 Sony PlaceEngine,它会根据它可以访问的 WiFi 信号为您提供位置。缺点是用户必须安装 PE 客户端。好处是它可以通过网站和/或本地应用程序访问。有一个在线服务器数据库,您可以查询详细信息,还有一个本地数据库选项,您可以在没有互联网的情况下查询位置估计。它用于一系列导航软件,包括作为索尼 Nav-U 设备中 GPS 的备份。此外,您还可以自行更新 placeEngine 数据(即添加新的接入点)。
选项 2 是 Apple 的 CoreLocation - 目前使用名为 SkyHook 的服务。我确信如果您愿意,您可以在非 Apple 平台上使用 SkyHook。
Google 的 Latitude 服务以某种方式使用 Gears,并且它必须使用 WiFi,因为它太准确了,无法仅基于 IP 地址。他们可能在后端使用 PlaceEngine 或 Skyhook 数据库本身......
please take a look at Sony PlaceEngine, it will get you the location based on the WiFi signals it can access. The down side is that users have to install the PE client. The up side is that it can be accessed by web sites and/or local apps. There is an online server DB you can query for detailed information, and a local DB option you can query for location estimates when there is no internet. This is used for a bunch of Navigation software, including as a back-up to GPS in Sony's Nav-U units. Also, you can update the placeEngine data yourself (i.e. add new access points).
Option 2 is Apple's CoreLocation - which currently uses a service known as SkyHook. I am sure you can use SkyHook on non-Apple platforms if you wish.
Google's Latitude service uses Gears somehow, and it must be using WiFi, because it's much too accurate to be based only on IP Address. They are probably using the PlaceEngine or Skyhook databases themselves on the back-end...
我用谷歌搜索并找到了这个: Lays Flat - 第 1 部分:Google地图 .NET 控件
I googled it and found this: Lat Lays Flat - Part 1 : A Google Maps .NET Control