谷歌地理定位 API 库 [英] Google Geolocation API library

查看:36
本文介绍了谷歌地理定位 API 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有图书馆可以使用 google 服务 (https://www.google.com/loc/json)?

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 支持它,如此处所述 http://code.google.com/p/gears/wiki/GeolocationAPI Web 服务请求/响应架构上也有很好的文档.

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 和 iPhone Safari 也使用该服务,并且它们有自己的实现.我想在我自己的 C# 应用程序中使用该服务,所以我想要一个我可以使用的库(C/C++/C# 之一).目前,我的同事让它工作的唯一方法是使用 IE 的齿轮插件并在我们的 WPF 应用程序中托管嵌入式 IE 窗口.这有点麻烦,并且可重新分发很差.

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.

有什么想法吗?

编辑这是来自上述页面的评论:

Edit This is a comment from the above page:

steveblock@google.com 的评论,2008 年 12 月 2 日

Comment by steveblock@google.com, Dec 02, 2008

感谢所有评论.一些回应...

Thanks for all the comments. A few responses ...

有关使用 API 的许多问题的答案可以在位于 http://code.google.com/apis/gears/api_geolocation.html.此 Wiki 页面旨在记录 Gears 开发者正在进行的工作,而不是作为 API 的权威文档.

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.

关于 JSON 协议,我已更新此文档以反映 Gears 中的当前行为.请注意,该协议的官方文档将很快添加到 Geolocation 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.

Gears 服务条款禁止直接使用 Google 位置服务器 (http://www.google.com/loc/json) 通过 HTTP 请求.此服务只能通过 Geolocation API 访问.

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.

这有点糟糕.那么 Firefox 是如何通过 HTTP 请求直接使用该服务的呢.

This kinda sucks. So how does Firefox gets away using this service directly via a HTTP request.

推荐答案

请看一下 Sony PlaceEngine,它会根据可以访问的 WiFi 信号为您获取位置.缺点是用户必须安装 PE 客户端.好的一面是它可以通过网站和/或本地应用程序访问.有一个在线服务器数据库,您可以查询详细信息,还有一个本地数据库选项,您可以在没有互联网时查询位置估计.这用于一堆导航软件,包括作为索尼 Nav-U 装置中 GPS 的备份.此外,您可以自己更新 placeEngine 数据(即添加新的访问点).

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

选项 2 是 Apple 的 CoreLocation - 目前使用称为 SkyHook 的服务.如果您愿意,我相信您可以在非 Apple 平台上使用 SkyHook.

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 的 Latitude 服务以某种方式使用了 Gears,而且它必须使用 WiFi,因为它太准确了,不能仅基于 IP 地址.他们可能自己在后端使用 PlaceEngine 或 Skyhook 数据库...

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

这篇关于谷歌地理定位 API 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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