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

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

The newest version!
// Automatically generated - do not modify!

@file:JsModule("cesium")

package cesium

/**
 * A utility class for generating custom map pins as canvas elements.
 * @see Online Documentation
 */
external class PinBuilder {
    /**
     * Creates an empty pin of the specified color and size.
     * @param [color] The color of the pin.
     * @param [size] The size of the pin, in pixels.
     * @return The canvas element that represents the generated pin.
     * @see Online Documentation
     */
    fun fromColor(
        color: Color,
        size: Double,
    ): org.w3c.dom.HTMLCanvasElement

    /**
     * Creates a pin with the specified icon, color, and size.
     * @param [url] The url of the image to be stamped onto the pin.
     * @param [color] The color of the pin.
     * @param [size] The size of the pin, in pixels.
     * @return The canvas element or a Promise to the canvas element that represents the generated pin.
     * @see Online Documentation
     */
    fun fromUrl(
        url: Resource,
        color: Color,
        size: Double,
    ): dynamic

    fun fromUrl(
        url: String,
        color: Color,
        size: Double,
    ): dynamic

    /**
     * Creates a pin with the specified [maki](https://www.mapbox.com/maki/) icon identifier, color, and size.
     * @param [id] The id of the maki icon to be stamped onto the pin.
     * @param [color] The color of the pin.
     * @param [size] The size of the pin, in pixels.
     * @return The canvas element or a Promise to the canvas element that represents the generated pin.
     * @see Online Documentation
     */
    fun fromMakiIconId(
        id: String,
        color: Color,
        size: Double,
    ): dynamic

    /**
     * Creates a pin with the specified text, color, and size.  The text will be sized to be as large as possible
     * while still being contained completely within the pin.
     * @param [text] The text to be stamped onto the pin.
     * @param [color] The color of the pin.
     * @param [size] The size of the pin, in pixels.
     * @return The canvas element that represents the generated pin.
     * @see Online Documentation
     */
    fun fromText(
        text: String,
        color: Color,
        size: Double,
    ): org.w3c.dom.HTMLCanvasElement
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy