main.cesium.PeliasGeocoderService.kt Maven / Gradle / Ivy
The newest version!
// Automatically generated - do not modify!
@file:JsModule("cesium")
@file:Suppress(
"EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)
package cesium
/**
* Provides geocoding via a [Pelias](https://pelias.io/) 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: ''
* }
* }))
* });
* ```
* @see Online Documentation
*
* @constructor
* @property [url] The endpoint to the Pelias server.
* @see Online Documentation
*/
external class PeliasGeocoderService(val url: Resource) {
constructor(url: String)
/**
* @param [query] The query to be sent to the geocoder service
* @param [type] The type of geocode to perform.
* Default value - [GeocodeType.SEARCH]
* @see Online Documentation
*/
fun geocode(
query: String,
type: GeocodeType? = definedExternally,
): kotlin.js.Promise>
}