placesOrNull

suspend fun Geocoder.placesOrNull(coordinates: Coordinates): List<Place>?

Geocode a Coordinates to a list of Places or null if unsuccessful.

In most cases, the list will contain a single Place. However, in some cases, it may return multiple Places.

Receiver

The Geocoder to use for geocoding.

Return

A list of Places or null if the geocoding was unsuccessful, either due to a geocoder error or not being able to find the location.

Parameters

coordinates

The Coordinates to geocode.


suspend fun Geocoder.placesOrNull(latitude: Double, longitude: Double): List<Place>?

Geocode a pair of coordinates to a list of Places or null if unsuccessful.

In most cases, the list will contain a single Place. However, in some cases, it may return multiple Places.

Receiver

The Geocoder to use for geocoding.

Return

A list of Places or null if the geocoding was unsuccessful, either due to a geocoder error or not being able to find the location.

Parameters

latitude

The latitude of the coordinates.

longitude

The longitude of the coordinates.