WeatherLayers
Search…
Timeline Control
Timeline control allows playing datetimes as animation with linear interpolation between two subsequent datetimes

Example

Timeline 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 timelineControl = new WeatherLayers.TimelineControl({
9
dataset: ..., // string (STAC Collection ID)
10
datetime: ..., // string (ISO 8601 datetime)
11
datetimeInterpolate: ..., // boolean
12
width: ..., // number
13
onUpdate: event => {
14
console.log(event.datetime); // string (ISO 8601 datetime)
15
},
16
});
Copied!
Copy link
Contents
Example