OpenCageGeocoderService

external class OpenCageGeocoderService(val url: Resource, apiKey: String, params: JsAny? = definedExternally)(source)

Provides geocoding via a OpenCage server.

// Configure a Viewer to use the OpenCage Geocoder
const viewer = new Viewer('cesiumContainer', {
geocoder: new OpenCageGeocoderService('https://api.opencagedata.com/geocode/v1/', '<API key>')
});

Parameters

apiKey

The OpenCage API Key.

params

An object with the following properties (See https://opencagedata.com/api#forward-opt):

params.abbrv

When set to 1 we attempt to abbreviate and shorten the formatted string we return.

See also

Constructors

Link copied to clipboard
constructor(url: Resource, apiKey: String, params: JsAny? = definedExternally)
constructor(url: String, apiKey: String, params: JsAny? = definedExternally)

Properties

Link copied to clipboard

Gets the credit to display after a geocode is performed. Typically this is used to credit the geocoder service.

Link copied to clipboard

Optional params passed to OpenCage in order to customize geocoding

Link copied to clipboard

The endpoint to the OpenCage server.

Functions

Link copied to clipboard