O'Reilly logo

iPad Application Development For Dummies, 3rd Edition by Neal Goldstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding Geocoding on the iPad

Being able to go from a coordinate on a map to an address is called reverse geocoding, and MapKit used to supply the ability to do that. But whereas MapKit implemented reverse geocoding, forward geocoding — the kind of geocoding that converts an address to a coordinate — just became available with iOS 5. Now, both forward and reverse geocoding can be found together in a new class — the CLGeocoder class — and both have been moved to the CoreLocation framework. So now, all’s right with the world. (Previously, you had to use one of the free or commercial services available to do forward geocoding.)

The CLGeocoder class (which is part of the CoreLocation framework that I show you how to add in Chapter 11) provides services for converting between a coordinate (specified as a latitude and longitude) and the user-friendly representation of that coordinate. User-friendly representation of the coordinate is the technical term for the street, city, state, and country information of a given location or a relevant point of interest, landmark, or other identifying information. The CLGeocoder class also provides services for the reverse: returning the coordinate value for a text string that is the user-friendly representation of that coordinate.

To use a CLGeocoder object, first create it and then send it a forward- or reverse-geocoding message.

check.png Reverse-geocoding: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required