OpenCageGeocoder

fun OpenCageGeocoder(apiKey: String, parameters: OpenCageParameters = OpenCageParameters(), json: Json = HttpApiEndpoint.json(), client: HttpClient = HttpApiEndpoint.httpClient(json), dispatcher: CoroutineDispatcher = Dispatchers.Default): Geocoder

Creates a new Geocoder using the OpenCage HTTP API geocoding service.

See OpenCage for more information.

Return

A new Geocoder using the OpenCage HTTP API geocoding service.

Parameters

apiKey

The OpenCage API key.

parameters

The parameters to use for the geocoder.

json

The JSON implementation to use for serialization.

client

The HTTP client to use for requests.

dispatcher

The coroutine dispatcher to use for requests.


fun OpenCageGeocoder(apiKey: String, json: Json = HttpApiEndpoint.json(), client: HttpClient = HttpApiEndpoint.httpClient(json), dispatcher: CoroutineDispatcher = Dispatchers.Default, block: OpenCageParametersBuilder.() -> Unit): Geocoder

Creates a new Geocoder using the OpenCage HTTP API geocoding service.

See OpenCage for more information.

Return

A new Geocoder using the OpenCage HTTP API geocoding service.

Parameters

apiKey

The OpenCage API key.

json

The JSON implementation to use for serialization.

client

The HTTP client to use for requests.

dispatcher

The coroutine dispatcher to use for requests.

block

Customize the OpenCageParameters to use for the geocoder.