Atlaslog
Atlaslog / deck.gl / API reference / GPUGridLayer
deck.gl · API reference

GPUGridLayer

Quick answer

GPUGridLayer was deck.gl's GPU-side grid aggregation layer: it binned points into a screen-aligned grid and computed cell weights on the GPU. It was deprecated in the v8 line and is no longer exported by deck.gl v9, so new code should use GridLayer or a custom GPU aggregation layer instead.

Last verified 2026-11-03 · deck.gl 9.0 · Cite this page
new deck.GPUGridLayer ( props )
Key points
Example
var grid = new deck.GPUGridLayer({
  id: 'grid-density',
  data: taxiPoints,
  getPosition: function (d) { return [d.lng, d.lat]; },
  cellSize: 400,
  colorAggregation: 'COUNT',
  getColorWeight: 1,
  colorRange: [
    [255, 255, 204, 160],
    [199, 233, 180, 170],
    [127, 205, 187, 180],
    [65, 182, 196, 190],
    [44, 127, 184, 200],
    [37, 52, 148, 210]
  ],
  colorDomain: [0, 3000],
  elevationAggregation: 'COUNT',
  elevationScale: 12,
  extruded: true,
  upperPercentile: 98,
  pickable: true
});
var next = grid.clone({
  cellSize: 200,
  elevationScale: 6
});

deckgl.setProps({ layers: [next] });
Notes
Runnable examplesChinese originalAll API references
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Cite this page

Atlaslog (2026). GPUGridLayer. https://www.jingweizhi.com/en/deckgl/api/gpu-grid-layer.html (accessed 2026-11-03).