PeliasGeocoderService

external class PeliasGeocoderService(val url: Resource)(source)

Provides geocoding via a Pelias server.

// Configure a Viewer to use the Pelias server hosted by https://geocode.earth/
const viewer = new Viewer('cesiumContainer', {
geocoder: new PeliasGeocoderService(new Resource({
url: 'https://api.geocode.earth/v1/',
queryParameters: {
api_key: '<Your geocode.earth API key>'
}
}))
});

See also

Constructors

Link copied to clipboard
constructor(url: String)
constructor(url: Resource)

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

The endpoint to the Pelias server.

Functions

Link copied to clipboard
suspend fun geocode(query: String, type: GeocodeType? = definedExternally): ReadonlyArray<GeocoderService.Result>
Link copied to clipboard
fun geocodeAsync(query: String, type: GeocodeType? = definedExternally): Promise<ReadonlyArray<GeocoderService.Result>>