Hardware-accelerated geospatial data plotting in the browser
autumnplot-gl • Docs
autumnplot-gl / MultiPlotLayer
A varying map layer. If the data don’t have a varying component, such as over time, it might be easier to use an PlotLayer instead.
// 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');
PlotLayerBase
<MapType
>• MapType extends MapLikeType
new MultiPlotLayer<
MapType
>(id
):MultiPlotLayer
<MapType
>
Create a time-varying map layer
• id: string
A unique id for this layer
MultiPlotLayer
<MapType
>
PlotLayerBase<MapType>.constructor
readonly
id:string
PlotLayerBase.id
protected
map:null
|MapType
PlotLayerBase.map
readonly
type:"custom"
PlotLayerBase.type
addField(
field
,key
):void
Add a field with a given key
• field: PlotComponent
<MapType
>
The field to add
• key: string
The key to associate with the field
void
getKeys():
string
[]
Get a list of all dates/times that have been added to the layer
string
[]
An array of dates/times
protected
repaint():void
void
PlotLayerBase.repaint
setActiveKey(
key
):void
Set the active key
• key: string
The new key. The field with that key is plotted immediately.
void