Skip to main content

Class: MultiPlotLayer<MapType>

Defined in: PlotLayer.ts:82

A varying map layer. If the data don't have a varying component, such as over time, it might be easier to use a PlotLayer instead.

Example

// Create a varying map layer
height_layer = new MultiPlotLayer('height-contours');

// Add some fields to it
height_layer.addField(height_contour_f00, '20230112_1200');
height_layer.addField(height_contour_f01, '20230112_1300');
height_layer.addField(height_contour_f02, '20230112_1400');

// Set the date/time in the map layer
height_layer.setActiveKey('20230112_1200');

Extends

  • PlotLayerBase<MapType>

Type Parameters

Type Parameter
MapType extends MapLikeType

Constructors

Constructor

new MultiPlotLayer<MapType>(id): MultiPlotLayer<MapType>

Defined in: PlotLayer.ts:92

Create a time-varying map layer

Parameters

ParameterTypeDescription
idstringA unique id for this layer

Returns

MultiPlotLayer<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

addField()

addField(field, key): void

Defined in: PlotLayer.ts:153

Add a field with a given key

Parameters

ParameterTypeDescription
fieldPlotComponent<MapType>The field to add
keystringThe key to associate with the field

Returns

void


getKeys()

getKeys(): string[]

Defined in: PlotLayer.ts:144

Get a list of all dates/times that have been added to the layer

Returns

string[]

An array of dates/times


repaint()

protected repaint(): void

Defined in: PlotLayer.ts:21

Returns

void

Inherited from

PlotLayerBase.repaint


setActiveKey()

setActiveKey(key): void

Defined in: PlotLayer.ts:133

Set the active key

Parameters

ParameterTypeDescription
keystringThe new key. The field with that key is plotted immediately.

Returns

void