OpenCageGeocoderService
external class OpenCageGeocoderService(val url: Resource, apiKey: String, params: Any? = 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>')
});
Content copied to clipboard
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.