Skip to main content

Class: PlotLayer<MapType>

Defined in: PlotLayer.ts:37

A static map layer. The data are assumed to be static in time. If the data have a time component (e.g., a model forecast), a MultiPlotLayer may be more appropriate.

Example

// Create map layers from provided fields
const height_layer = new PlotLayer('height-contours', height_contours);
const wind_speed_layer = new PlotLayer('wind-speed-fill', wind_speed_fill);
const barb_layer = new PlotLayer('barbs', wind_barbs);

Extends

  • PlotLayerBase<MapType>

Type Parameters

Type Parameter
MapType extends MapLikeType

Constructors

Constructor

new PlotLayer<MapType>(id, field): PlotLayer<MapType>

Defined in: PlotLayer.ts:45

Create a map layer from a field

Parameters

ParameterTypeDescription
idstringA unique id for this layer
fieldPlotComponent<MapType>The field to plot in this layer

Returns

PlotLayer<MapType>

Overrides

PlotLayerBase<MapType>.constructor

Properties

PropertyModifierTypeInherited fromDefined in
idreadonlystringPlotLayerBase.idPlotLayer.ts:9
mapprotectednull | MapTypePlotLayerBase.mapPlotLayer.ts:10
typereadonly"custom"PlotLayerBase.typePlotLayer.ts:8

Methods

repaint()

protected repaint(): void

Defined in: PlotLayer.ts:21

Returns

void

Inherited from

PlotLayerBase.repaint