Legend Control
Last updated
import * as WeatherLayers from 'weatherlayers-gl';
const legendControl = new WeatherLayers.LegendControl({
title: 'Wind',
unitFormat: {
unit: 'm/s',
},
palette: [
[0, [255, 255, 255]],
[5, [127, 255, 255]],
[10, [127, 255, 127]],
[15, [255, 255, 127]],
[20, [255, 127, 127]],
[25, [127, 0, 0]],
],
});
legendControl.addTo(document.getElementById('controls'));