Geocoder

fun Geocoder(platformGeocoder: HttpApiPlatformGeocoder, dispatcher: CoroutineDispatcher = Dispatchers.Default): Geocoder

Create a new Geocoder instance that uses a HttpApiPlatformGeocoder.

You can create your own HttpApiPlatformGeocoder object, or you can use one of the provided extension artifacts.

Return

A new Geocoder instance.

Parameters

platformGeocoder

The HttpApiPlatformGeocoder to use for geocoding operations.

dispatcher

The CoroutineDispatcher to use for geocoding operations.


fun Geocoder(forwardEndpoint: ForwardEndpoint, reverseEndpoint: ReverseEndpoint, json: Json = HttpApiEndpoint.json(), httpClient: HttpClient = HttpApiEndpoint.httpClient(json), dispatcher: CoroutineDispatcher = Dispatchers.Default): Geocoder

Create a new Geocoder instance that uses a HttpApiPlatformGeocoder which is constructed from the supplied ForwardEndpoint and ReverseEndpoint.

Return

A new Geocoder instance.

Parameters

forwardEndpoint

The ForwardEndpoint to use for forward geocoding operations.

reverseEndpoint

The ReverseEndpoint to use for reverse geocoding operations.

json

The Json instance to use for serialization and deserialization.

httpClient

The HttpClient to use for network operations.

dispatcher

The CoroutineDispatcher to use for geocoding operations.