问题
I am perplexed as to why there is an iPhone API for Reverse Geocoding (lat/long to address) but NOT for regular Geocoding (address to lat/long).
I want to be able to display an annotation on a map (MKMapView) at an address entered by the user. (As text, not by touching the map) As far as I can tell, that means I have to determine the lat/long for the entered address.
It looks like it can be done using HTTP, but then, Reverse Geocoding ALSO could have been done that way, too. Why did they support one but not the other?
Answers as to "why?" or "how?" would both be appreciated.
*** Anyone learned anything new on this topic? Any announcements I haven't heard about?
回答1:
I had the same issue and wrote a geocoding class. http://web.me.com/andreas.bungert/erle_muss_sein/iPhone_Development/Einträge/2009/7/9_Geocoding_im_SDK.html
Best Regards
回答2:
Merrimack wrote an answer here with a useful example..
Forward geocoding from the iPhone
There is a nice blog post of him
http://blog.sallarp.com/ipad-iphone-forward-geocoding-api-google/
回答3:
For those finding this question long after it was asked:
As brainjam notes, since iOS 5 Apple's CLGeocoder class supports forward-geocoding.
回答4:
I am looking at the source code available from:
http://www.pragprog.com/screencasts/v-bdmapkit/using-the-map-kit
In what part the forward geocoding used?
Thanks
来源:https://stackoverflow.com/questions/988060/how-do-i-do-geocoding-not-reverse-geocoding-on-iphone