“Geocoding for iPhone 3.0”

Garrett Moon by Garrett Moon 6.17.2009 4 comments

Geocoding for iPhone 3.0

While playing around with the iPhone 3.0 SDK beta, I found a glaring omission in Apple’s Maps SDK. The SDK has a class for reverse geocoding coordinates to corresponding addresses, it doesn’t allow for the reverse (geocoding). I would guess this has something to do with an agreement with Google, but it just seems like it should be there. So I wrote a class that uses the API provided by http://tinygeocoder.com, GMGeocoder.

GMGeocoder sample app screenshot

It works almost exactly like the official MKReverseGeocoder, with similar delegates and structure. I also whipped up a quick sample application that runs in the iPhone simulator that takes addresses and puts them on an MKMapView. As always, comments and improvements are welcome. Go out and make wonderful apps.

Posted Under:

Leave a 4 comments, or see other articles by Garrett Moon