Android Geocoder
The AndroidGeocoder class abstracts away the use of a built in Android Geocoder for geocoding and reverse geocoding.
Functions
Link copied to clipboard
open suspend override fun getAddressFromLngLat(userGeometry: UserGeometry, localizedContext: Context?): LocationDescription?
Link copied to clipboard
open suspend override fun getAddressFromLocationName(locationName: String, nearbyLocation: LngLatAlt, localizedContext: Context?): List<LocationDescription>?
The main weakness of the AndroidGeocoder is that it doesn't include the names of Points of Interest in the search results. It will include the address, but it won't have the associated business name for that address. All we can do is pass through the "locationName" that was searched for, typos and all.