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
Parameter | Type | Description |
---|---|---|
id | string | A unique id for this layer |
Returns
MultiPlotLayer
<MapType
>
Overrides
PlotLayerBase<MapType>.constructor
Properties
Property | Modifier | Type | Inherited from | Defined in |
---|---|---|---|---|
id | readonly | string | PlotLayerBase.id | PlotLayer.ts:9 |
map | protected | null | MapType | PlotLayerBase.map | PlotLayer.ts:10 |
type | readonly | "custom" | PlotLayerBase.type | PlotLayer.ts:8 |
Methods
addField()
addField(
field
,key
):void
Defined in: PlotLayer.ts:153
Add a field with a given key
Parameters
Parameter | Type | Description |
---|---|---|
field | PlotComponent <MapType > | The field to add |
key | string | The 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
Parameter | Type | Description |
---|---|---|
key | string | The new key. The field with that key is plotted immediately. |
Returns
void