Class WxLayerBaseImplementation

Implementation of universal methods for the layer (for Mapbox and Leaflet) To be extended by framework specific implementation Wrapps some methods of WxLayer

Hierarchy

  • FrameworkParentClass

Implements

Constructors

Properties

_needUpdateDSManager: boolean = false

A boolean flag indicating whether the dataset manager needs to be updated or not.

attribution?: string

MAPBOX API

bounds?: [number, number, number, number]

MAPBOX API

dataType: "raster" = 'raster'

MAPBOX API required

id: string

MAPBOX API required

maxzoom?: number

MAPBOX API

opacity?: number
tileSize: number = 256

MAPBOX API required. only 256

type: "custom" = 'custom'

MAPBOX API required

Accessors

Methods

  • Fires an event of the specified type with the given data. Calls all listeners for the type asynchronously.

    Returns

    Type Parameters

    • T extends "changed"

    Parameters

    • type: T

      The event type.

    • data: WxEventType[T]

      The data to pass to the listeners.

    Returns void

  • Get all available times for the source.

    Returns

    An array of all available times for the source.

    Returns string[]

  • Removes a listener for the event.

    Returns

    Type Parameters

    • T extends "changed"

    Parameters

    • type: T

      The event name.

    • listener: ListenerMethod

      The listener function to remove.

    Returns void

  • Adds a listener for the event that will be executed only once. After the event is fired, the listener will be removed.

    Returns

    Type Parameters

    • T extends "changed"

    Parameters

    • type: T

      The event name.

    • listener: ListenerMethod

      The listener function to add.

    Returns void

  • Set the coarse maximum zoom level to make tiles load faster during animation.

    Returns

    A promise that resolves when the coarse maximum zoom level is set.

    Parameters

    • level: number = 2

      The coarse maximum zoom level to set.

    Returns Promise<void>

  • Set the style of the source by its name from default styles.

    Returns

    A promise that resolves when the style is set.

    Parameters

    • wxstyleName: string

      Name of the new style to set.

    • reload: boolean = true

      If true, the source will be reloaded and rerendered.

    Returns Promise<void>

  • Set time and render the source. If the time is not available, the closest time will be used.

    Returns

    A promise that resolves with current time step when the time is set and the source is loaded and rendered.

    Parameters

    • Optional time: WxDate

      Time to set.

    • Optional requestInit: WxRequestInit

      Request options for fetch.

    • Optional redraw: boolean

    Returns Promise<string>

Generated using TypeDoc