Get street address at lat/long pair

南笙酒味 提交于 2019-12-17 07:05:58

问题


I've seen that it's possible to get the latitude and longitude (geocoding, like in Google Maps API) from a street address, but is it possible to do the reverse and get the street address when you know what the lat/long already is?

The application would be an iPhone app (and why the app already knows lat/long), so anything from a web service to an iPhone API would work.


回答1:


Google again

http://nicogoeminne.googlepages.com/documentation.html

http://groups.google.com/group/Google-Maps-API/web/resources-non-google-geocoders




回答2:


Google now supports reverse geocoding in both JavaScript API and webservice over HTTP. Request looks like this:

http://maps.google.com/maps/geo?output=xml&oe=utf-8&ll=LAT,LON&key=API_KEY

Note, you must change LAT to latitude, LON to longitude and API_KEY to be you Google Maps API key. Service return results on on countries which geocoding marked as YES in following spreadsheet:

http://gmaps-samples.googlecode.com/svn/trunk/mapcoverage_filtered.html

More info should be found soon from official documentation:

http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct




回答3:


This is called "reverse geocoding", and there do exist web services that will provide this functionality.

I'd urge being wary of the quality, scaling, and reliability of free services, but here's a place to start: http://www.geonames.org/export/reverse-geocoding.html




回答4:


iPhone OS 3.0 now has the MKReverseGeocoder class for precisely this purpose.




回答5:


You can also use LINK REMOVED library for that purpose. MKReverseGeocoder is nice but it requires you to use it with a Google map. From MKReverseGeocoder reference documentation:

The Google terms of service require that the reverse geocoding service be used in conjunction with a Google map; take this into account when designing your application’s user interface.

SSLocationManager might be an alternative in the case your application does not use a Google Map but just needs to access detailed information about the current location having only latitude and longitude data at hand. It uses Yahoo! PlaceFinder API. Hope this helps.



来源:https://stackoverflow.com/questions/158557/get-street-address-at-lat-long-pair

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