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

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

// Automatically generated - do not modify!

@file:JsModule("cesium")

@file:Suppress(
    "NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE",
)

package cesium

/**
 * Provides geocoding through Cesium ion.
 * @see Online Documentation
 */
external class IonGeocoderService(options: ConstructorOptions) {
    /**
     * @property [scene] The scene
     * @property [accessToken] The access token to use.
     *   Default value - [Ion.defaultAccessToken]
     * @property [server] The resource to the Cesium ion API server.
     *   Default value - [Ion.defaultServer]
     */
    interface ConstructorOptions {
        var scene: Scene
        var accessToken: String?
        var server: Resource?
    }

    /**
     * @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>
}

inline fun IonGeocoderService(
    block: IonGeocoderService.ConstructorOptions.() -> Unit,
): IonGeocoderService {
    val options: IonGeocoderService.ConstructorOptions = js("({})")
    block(options)
    return IonGeocoderService(options)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy