WeatherLayers
Search…
Legend Control
Legend control shows the color legend for the raster layer

Example

Legend Control
1
import * as WeatherLayers from '@weatherlayers/weatherlayers-gl';
2
3
// configure WeatherLayers Cloud client
4
WeatherLayers.setClientConfig({
5
accessToken: 'xxx',
6
});
7
8
const legendControl = new WeatherLayers.LegendControl({
9
dataset: ..., // string (STAC Collection ID)
10
width: ..., // number
11
ticksCount: ..., // number
12
});
Copied!
Copy link
Contents
Example