Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AdvisoryLegend

An advisory legend is a legend object that is responsible for displaying and managing a point legend based on dynamic advisory data that filters advisory elements based on specific filters and/or VTEC codes.

export

Hierarchy

Implements

Index

Constructors

constructor

  • Initializes and returns a legend for the specified key and configuration options.

    memberof

    Legend

    Parameters

    Returns AdvisoryLegend

Accessors

$el

  • get $el(): any
  • DOM element for the legend.

    readonly
    memberof

    Legend

    Returns any

account

  • Aeris account used when requesting data for dynamic legends.

    readonly
    memberof

    Legend

    Returns Account

image

  • get image(): HTMLImageElement
  • Returns HTMLImageElement

key

  • get key(): string
  • Key associated with the legend.

    readonly
    memberof

    Legend

    Returns string

opts

  • Configuration options.

    readonly
    memberof

    Legend

    Returns LegendOptions

Methods

getSize

has

  • has(type: string): boolean
  • Returns whether the listeners are registered for the specified event name.

    memberof

    EventDispatcher

    Parameters

    • type: string

    Returns boolean

hide

  • hide(): void
  • Hides the legend DOM element.

    memberof

    Legend

    Returns void

off

  • Removes a registered listener function for the specified event.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to remove the listener for.

    • callback: Function

      Handler function to remove so it won't be executed next time the event is triggered.

    • Default value scope: any = null

    Returns EventDispatcher

offAll

on

  • on(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed each time an event occurs

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

once

  • once(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed the first time an event occurs.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

reset

  • reset(): void

resize

  • resize(): void
  • Returns void

setMetric

  • setMetric(metric: boolean): void
  • Sets whether to display data values in Metric units.

    memberof

    Legend

    Parameters

    • metric: boolean

    Returns void

setSize

  • setSize(size: Size): void

show

  • show(): void
  • Shows the legend DOM element.

    memberof

    Legend

    Returns void

trigger

  • Triggers the specified event so that all registered listeners will be executed with the specified parameters.

    memberof

    EventDispatcher

    Parameters

    • type: any

      Event name to trigger

    • Default value data: any = null

    Returns EventDispatcher

units

  • units(): string
  • Returns the unit based on whether the legend is displaying values in Metric or Imperial.

    memberof

    Legend

    Returns string

update

  • update(opts?: any, force?: boolean): void
  • Forces the legend to update if needed.

    Typically this method is called with valid coordinate bounds passed to the opts.within property in order to update the advisories displayed based on those within the specified bounds.

    memberof

    AdvisoryLegend

    Parameters

    • Optional opts: any
    • Default value force: boolean = false

    Returns void

url

  • url(): string
  • Returns the calculated legend url.

    memberof

    StyledLegend

    Returns string

Generated using TypeDoc