Controls the time animation for a given WxTileSource instance.

The WxTimeControl class is responsible for displaying and controlling the time-based interactions with the tile source, allowing users to start/stop animations, select times, and manage time settings.

Hierarchy

  • WxTimeControl

Constructors

  • Creates a new instance of the WxTimeControl class.

    Parameters

    • delay: number

      The delay in milliseconds between time steps.

    • Optional wxsource: WxTileSource

      The optional WxTileSource to interact with. If not provided, no interaction will occur.

    Returns WxTimeControl

Properties

_div: HTMLDivElement
buttonPlayStop: HTMLButtonElement
delay: number

The delay in milliseconds between time steps.

onchange: ((time: string) => void) = ...

Type declaration

    • (time: string): void
    • Callback function triggered when the time changes.

      Parameters

      • time: string

        The selected time as a string.

      Returns void

timesEl: HTMLSelectElement
wxsource?: WxTileSource

The optional WxTileSource to interact with. If not provided, no interaction will occur.

Methods

  • Returns an object to extend map controls in leaflet.

    Returns

    The object containing onAdd and onRemove methods.

    Returns {
        onAdd: (() => HTMLDivElement);
        onRemove: (() => void);
    }

    • onAdd: (() => HTMLDivElement)
        • (): HTMLDivElement
        • Returns HTMLDivElement

    • onRemove: (() => void)
        • (): void
        • Returns void

  • Sets the available times for the control's time selector (<select> element).

    Parameters

    • times: string[]

      An array of time strings to populate the time selector.

    Returns void

  • Updates the time control to use a new WxTileSource and reloads the available times.

    Parameters

    • Optional wxsource: WxTileSource

      The new WxTileSource instance to use.

    Returns void

Generated using TypeDoc