Google Geolocation API library

我的未来我决定 提交于 2019-11-27 18:31:53

问题


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 steveblock@google.com, 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.


回答1:


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




回答2:


I googled it and found this: Lat Lays Flat - Part 1 : A Google Maps .NET Control



来源:https://stackoverflow.com/questions/1535619/google-geolocation-api-library

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