iOS Developer Library

Developer

MapKit Framework Reference MKReverseGeocoderDelegate Protocol Reference

Options
Deployment Target:

On This Page

MKReverseGeocoderDelegate

Inherits From


Not Applicable

Conforms To


Import Statement


Not Applicable

Objective-C

@import MapKit;

Availability


Available in iOS 3.0 and later
Deprecated in iOS 5.0

The MKReverseGeocoderDelegate protocol defines the interface for receiving messages from an MKReverseGeocoder object. You use this protocol to receive the placemark information for a given coordinate or to retrieve any errors that occurred during the reverse-geocoding process.

Delegates must implement both methods of this protocol.

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.

Each Map Kit application has a limited amount of reverse geocoding capacity, so it is to your advantage to use reverse geocode requests sparingly. For more information about when to initiate reverse-geocoding requests, see MKReverseGeocoder Class Reference.

  • Tells the delegate that a reverse geocoder successfully obtained placemark information for its coordinate. (required)

    Deprecation Statement

    Use the CLGeocoder class instead.

    Declaration

    Objective-C

    - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark

    Parameters

    geocoder

    The reverse geocoder object that completed its request successfully.

    placemark

    The object containing the placemark data.

    Discussion

    You can get the map coordinate for the associated request from either the reverse geocoder object or from the placemark object, which itself supports the MKAnnotation protocol.

    Import Statement

    Objective-C

    @import MapKit;

    Availability

    Available in iOS 3.0 and later

    Deprecated in iOS 5.0

  • Tells the delegate that the specified reverse geocoder failed to obtain information about its coordinate. (required)

    Deprecation Statement

    Use the CLGeocoder class instead.

    Declaration

    Objective-C

    - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error

    Parameters

    geocoder

    The reverse geocoder object that was unable to complete its request.

    error

    An error object indicating the reason the request did not succeed.

    Import Statement

    Objective-C

    @import MapKit;

    Availability

    Available in iOS 3.0 and later

    Deprecated in iOS 5.0