Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
223 views
in Technique[技术] by (71.8m points)

c# - Google Geolocation API library

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...