Represents a control for displaying a weather legend on a map. The control shows a color gradient legend based on weather data values. It allows for drawing the legend with specific styles and clearing the canvas.

Hierarchy

  • WxLegendControl

Constructors

Properties

Methods

Constructors

Properties

_canvas: HTMLCanvasElement
_div: HTMLDivElement

Methods

  • Draws the legend on the canvas based on the provided color style. The legend includes a color gradient and ticks for data values.

    Parameters

    • style: WxColorStyleStrict

      The WxColorStyleStrict object defining the color style for the legend.

    Returns void

  • Returns methods to integrate this legend control with a Leaflet map.

    Returns

    An object containing the onAdd and onRemove methods for Leaflet integration.

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

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

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

Generated using TypeDoc