Parsing and Understanding Location Data

When the location manager returns a location, it will be an instance of CLLocation. The CLLocation contains several pieces of useful information about the location. First is the latitude and longitude, expressed as a CLLocationCoordinate2D.

CLLocationCoordinate2D coord = lastLocation.coordinate;NSLog(@"Location lat/long: %f,%f",coord.latitude, coord.longitude);

Latitude is represented as a number of degrees north or south of the equator, where the equator is zero degrees, the north pole is 90 degrees, and south pole is –90 degrees. Longitude is represented as a number of degrees east or west of the prime meridian, which is an imaginary line (or meridian) running from the north ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.