WeatherLayers
Search…
Grid Layer
Variable rendered as grid of values or symbols (arrows, wind barbs)

Example

Grid Layer
1
import { Deck } from '@deck.gl/core';
2
import * as WeatherLayers from '@weatherlayers/weatherlayers-gl';
3
4
// configure WeatherLayers Cloud client
5
WeatherLayers.setClientConfig({
6
accessToken: 'xxx',
7
});
8
9
const deckgl = new Deck({
10
layers: [
11
new WeatherLayers.GridLayer({
12
// data properties
13
dataset: 'gfs/wind_10m_above_ground',
14
datetime: '2022-01-01T00:00:00Z',
15
}),
16
],
17
});
Copied!

Example: Arrows

Grid Layer: Arrows
1
import { Deck } from '@deck.gl/core';
2
import * as WeatherLayers from '@weatherlayers/weatherlayers-gl';
3
4
// configure WeatherLayers Cloud client
5
WeatherLayers.setClientConfig({
6
accessToken: 'xxx',
7
});
8
9
const deckgl = new Deck({
10
layers: [
11
new WeatherLayers.GridLayer({
12
// data properties
13
dataset: 'gfs/wind_10m_above_ground',
14
datetime: '2022-01-01T00:00:00Z',
15
16
// style properties
17
style: WeatherLayers.GridStyle.ARROW,
18
}),
19
],
20
});
Copied!

Example: Wind Barbs

Grid Layer: Wind Barbs
1
import { Deck } from '@deck.gl/core';
2
import * as WeatherLayers from '@weatherlayers/weatherlayers-gl';
3
4
// configure WeatherLayers Cloud client
5
WeatherLayers.setClientConfig({
6
accessToken: 'xxx',
7
});
8
9
const deckgl = new Deck({
10
layers: [
11
new WeatherLayers.GridLayer({
12
// data properties
13
dataset: 'gfs/wind_10m_above_ground',
14
datetime: '2022-01-01T00:00:00Z',
15
16
// style properties
17
style: WeatherLayers.GridStyle.WIND_BARB,
18
}),
19
],
20
});
Copied!

Data Properties

Data properties are common for all layers in the cloud bundle.

Style Properties

Style properties are the same as in the standalone bundle.