All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.cesium.OpenCageGeocoderService.kt Maven / Gradle / Ivy

There is a newer version: 1.90.0-10
Show newest version
// Automatically generated - do not modify!

@file:Suppress(
    "EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)

package cesium

/**
 * Provides geocoding via a [OpenCage](https://opencagedata.com/) server.
 * ```
 * // Configure a Viewer to use the OpenCage Geocoder
 * var viewer = new Viewer('cesiumContainer', {
 *   geocoder: new OpenCageGeocoderService('https://api.opencagedata.com/geocode/v1/', '')
 * });
 * ```
 * @see Online Documentation
 *
 * @constructor
 * @property [url] The endpoint to the OpenCage server.
 * @param [apiKey] The OpenCage API Key.
 * @param [params] An object with the following properties (See https://opencagedata.com/api#forward-opt):
 * @param [params.abbrv] When set to 1 we attempt to abbreviate and shorten the formatted string we return.
 * @see Online Documentation
 */
@JsName("\$cesium__OpenCageGeocoderService")
external class OpenCageGeocoderService(
    val url: Resource,
    apiKey: String,
    params: dynamic = definedExternally,
) {
    constructor(
        url: String,
        apiKey: String,
        params: dynamic = definedExternally,
    )

    /**
     * Optional params passed to OpenCage in order to customize geocoding
     * @see Online Documentation
     */
    val params: Any

    /**
     * @param [query] The query to be sent to the geocoder service
     * @see Online Documentation
     */
    fun geocode(query: String): kotlin.js.Promise>
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy