Reverse Geocoding

Reverse Geocoding refers to the conversion of a location's geographic coordinates into a human-readable street address. The Maps SDK for iOS includes a class called the CMSGeocoder class, which includes the reverseGeocodeCoordinate member function which you can use to perform the conversion. This method takes location coordinates in an instance of a CLLocationCoordinate2D object, and returns a human-readable street address in an instance of the GMSAddress class.

The influence of language preferences

The geocoder is optimized to provide human readable street addresses. To achieve this, it returns street addresses in the local language, transliterated to text that is readable by the user (if necessary). All other addresses are returned in the preferred language.

  • Address components are returned in the same language, which is chosen from the first component.

  • If a name is not available in the preferred language, then the geocoder uses the closest match.

Guarantees regarding address components

Google makes no guarantee regarding address components. Address structure changes from country to country, and even within countries.

  • You can expect address components to contain only what is relevant for postal addresses, and little more.

  • In particular, locality is neither guaranteed to be always present, nor is it supposed to always represent the city.

For an example of address components in action, see Place Autocomplete Address Form.

Sorting the results

Results aren't sorted by distance, and the order is subject to change.

  • A particular order is not guaranteed.

  • There is no guarantee about what the first result will be.

Reverse geocoding is an estimate

The geocoder attempts to find the closest addressable location within a particular tolerance.

  • If the geocoder can't find a match, then it returns no results.

For more information, see Geocoding Addresses Best Practices, and also see the Geocoding FAQ.