ReverseGeocoder

public protocol ReverseGeocoder

Interface of the Reverse Geocoding API. Reverse geocoding is the process of translating geographic coordinates in the form of latitude and longitude into a readable address or location description that can be easily understood by humans. This process makes possible the identification of specific location details such as the street address, city, postal code, and other relevant information associated with a particular location on a map. For example, the location (52.391174, 4.910375) can be translated to the address (Distelweg, 141031 HE, Amsterdam). A typical use case is for the end user to click on the map and see the address at the clicked position.

  • Translates a location, in the form of latitude and longitude, into a human-readable address. The reverse geocoder will attempt to describe the location, which may be an area name such as “Amsterdam, Netherlands”, an address such as “Oosterdoksstraat 114, 1011 DK Amsterdam, Netherlands”, and so forth.

    Declaration

    Swift

    func reverseGeocode(options: ReverseGeocoderOptions, completion: @escaping (Result<ReverseGeocoderResponse, Error>) -> ())

    Parameters

    options

    Specifies the input and filters of the request. For example, the location to be reverse geocoded and the language of the returned result.

    completion

    Containing either a ReverseGeocoderResponse with the matched addresses if the call succeeds, or an Error if it fails.