5

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?

Amagrammer
  • 6,385
  • 3
  • 28
  • 30
  • 2
    iPhone SDK 3.0 is still under NDA. You really need to ask this question on http://devforums.apple.com. Also, I happen to know you'll find the answer there ;-) – Alex Jun 12 '09 at 17:51
  • 1
    Thanks Alex. I keep forgetting about the NDA -- I just don't think that way. Good thing I don't have anyone asking *me* questions... – Amagrammer Jun 12 '09 at 18:53
  • 1
    In iOS5, use this: http://stackoverflow.com/a/7936272/242848 – brainjam Jan 27 '12 at 19:12

4 Answers4

4

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/

Community
  • 1
  • 1
S.P.
  • 5,427
  • 11
  • 56
  • 83
3

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

Erle
  • 173
  • 13
  • Cool, thanks. I ended up using code supplied by Bill Dudney (http://www.pragprog.com/screencasts/v-bdmapkit/using-the-map-kit). – Amagrammer Sep 18 '09 at 13:36
  • @VansFannel I reuploaded it under http://files.mettigel-software.com/TSGeocoder.zip There are some bugs in it, i think. If I got some time i will remove them – Erle Aug 03 '10 at 19:20
1

For those finding this question long after it was asked:

As brainjam notes, since iOS 5 Apple's CLGeocoder class supports forward-geocoding.

pidge
  • 1,037
  • 9
  • 26
0

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

Yoichi
  • 12,233
  • 2
  • 18
  • 11
  • It doesn't look like that example uses either form of geocoding (forward OR reverse) – Amagrammer Jan 26 '10 at 15:25
  • That's the link you provided, and that was the only MapKit source could get there. How did you get the source code you used? Or, was it a compiled commercial library? – Yoichi Feb 07 '10 at 10:01
  • I must have provided the wrong link, sorry. I don't have time to backtrack now, but I will try to figure it out later. – Amagrammer Mar 10 '10 at 16:32
  • @Amagrammer: Have you updated the url to get the correct geocoder? – VansFannel May 26 '10 at 16:54