getLocationDescription

fun getLocationDescription(location: LngLatAlt, preserveLocation: Boolean = true): LocationDescription?

getLocationDescription returns a LocationDescription object for the current location. This is basically a reverse geocode. It initially tries to generate it from local tile data, but falls back to geocoding via the Photon server if network is available.

Return

a LocationDescription object containing an address of the location

Parameters

location

to reverse geocode

preserveLocation

ensures that the returned LocationDescription contains the passed in location rather than overwriting it with the location of a POI that it geocded to.