Skip to main content
Fromv9.1deck.glv10.0WebGPUpartial

Overview

This module provides a suite of geospatial layers for deck.gl.

caution

The deck.gl-community repository is semi-maintained. One of its goals is to collect and preserve valuable deck.gl ecosystem code that does not have a dedicated home. Some modules may no longer have dedicated maintainers, so responses to issues are not guaranteed.

Installation​

npm install @deck.gl-community/layers

Use @deck.gl-community/layers/geo-layers for tile layers and /geo-layers/tileset for the standalone tileset. Use @deck.gl-community/layers/global-grid-layers for the grid layer and built-in grids. The /global-grid-layers/h3 and /global-grid-layers/a5 adapters require the application to install h3-js and a5-js, respectively. For wind, install delaunator and import from @deck.gl-community/layers/wind-layers.

Background​

This module exports geospatial deck.gl layers developed by the community.

Wind showcase​

:::caution Work in progress The wind-layer API and historical showcase are experimental. ParticleLayer, filled arrows, and both station-triangulated and image-derived terrain are verified on WebGL2 and WebGPU. :::

The wind showcase guide recreates Nicolas Belmonte's original deck.gl wind showcase using the original 72-hour forecast, smoothed three-dimensional mountain terrain, directional arrows, and up to one million GPU-animated particles.

import {
createWindField,
parseWindData,
ParticleLayer,
WindFieldLayer
} from '@deck.gl-community/layers/wind-layers';

const frames = parseWindData(weatherBuffer, stations.length);
const windField = createWindField(stations, frames);

const layers = [
new WindFieldLayer({id: 'wind-arrows', windField, time}),
new ParticleLayer({
id: 'wind-particles',
windField,
time,
numParticles: 100_000
})
];

Create and share the wind field once; advance time without rebuilding the station triangulation, weather textures, or GPU particle buffers.

API Reference​

Examples​

  • Wind Map recreates Nicolas Belmonte's original deck.gl wind showcase using its original 72-hour station forecast and imported, reusable geo-layers.
  • SharedTile2DLayer example demonstrates one shared loaders.gl TileSource feeding multiple SharedTile2DLayers across multiple views. It also shows shared SharedTileset2D cache stats rendered through SharedTileset2D.stats and uses TileGridLayer to visualize tile loading.