Geocoder

Provides geocoding operations:

  • Convert an address to a latitude and longitude (forward geocoding)

  • Convert a latitude and longitude to an address (reverse geocoding)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard

Get a list of Coordinatess for a given address or null if unsuccessful.

Link copied to clipboard

Get a Coordinates for a given address or null if unsuccessful.

Link copied to clipboard
abstract suspend fun forward(address: String): GeocoderResult<Coordinates>

Get a list of Coordinatess for a given address.

Link copied to clipboard
abstract fun isAvailable(): Boolean

Check if the geocoder is available.

Link copied to clipboard
open suspend fun locations(address: String): GeocoderResult<Coordinates>

Get a list of Coordinatess for a given address.

Link copied to clipboard
suspend fun Geocoder.placeOrNull(coordinates: Coordinates): Place?

Geocode a Coordinates to a Place or null if unsuccessful.

suspend fun Geocoder.placeOrNull(latitude: Double, longitude: Double): Place?

Geocode a pair of coordinates to a Place or null if unsuccessful.

Link copied to clipboard
open suspend fun places(coordinates: Coordinates): GeocoderResult<Place>

Get the address for a given Coordinates.

open suspend fun places(latitude: Double, longitude: Double): GeocoderResult<Place>

Get the address for a given latitude and longitude.

Link copied to clipboard
suspend fun Geocoder.placesOrNull(coordinates: Coordinates): List<Place>?

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

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

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

Link copied to clipboard
open suspend fun reverse(coordinates: Coordinates): GeocoderResult<Place>

Get the address for a given Coordinates.

abstract suspend fun reverse(latitude: Double, longitude: Double): GeocoderResult<Place>

Get the address for a given latitude and longitude.