Search code examples
iphoneioscllocationmanagercllocation

CLLocationManager - Coordinates to Address


I'm using a CLLocationManager in an attempt to find the address that the user is currently at. How can I convert the coordinates returned by the class to an actual address/business without a visual map view? Or is there a different class to return this data? Thanks.


Solution

  • Have a look at MKReverseGeocoder class:

    The MKReverseGeocoder class provides services for converting a map coordinate (specified as a latitude/longitude pair) into information about that coordinate, such as the country, city, or street. A reverse geocoder object is a single-shot object that works with a network-based map service to look up placemark information for its specified coordinate value.

    However, you mention you do not want to provide a map. This violates the terms of service:

    The MapKit framework uses Google services to provide map data. (...) The Google terms of service require that the reverse geocoding service be used in conjunction with a Google map; take this into account when designing your application's user interface.

    If you definetely do not want to prove a map, you may have to look into a reverse geocoding service other than Google's.