Skip to content

Shape

shapeThe method is used to specify the type of heat drawn by the heat layer. Now it supports three types: classic heat, cellular heat, and grid heat.

shape(‘heatmap’)

shapeforheatmapHeat layers are used to draw classic heat in 2D.

shape(‘heatmap3D’)

shapeforheatmap3DThermal layers are used to draw 3D heat.

transforms

Implementation of Grid Thermal and Cellular Thermal depends on configurationtransformsparameters,Specific instructions for use。

fetch('https://gw.alipayobjects.com/os/basement_prod/513add53-dcb2-4295-8860-9e7aa5236699.json')
  .then((res) => res.json())
  .then((data) => {
    const layer = new HeatmapLayer({})
      .source(data, {
        transforms: [
          {
            type: 'hexagon',
            size: 100,
            field: 'h12',
            method: 'sum',
          },
        ],
      })
      .size('sum', [0, 600])
      .shape('hexagonColumn')
      .style({
        coverage: 0.8,
        angle: 0,
      })
      .color(
        'sum',
        [
          '#094D4A',
          '#146968',
          '#1D7F7E',
          '#289899',
          '#34B6B7',
          '#4AC5AF',
          '#5FD3A6',
          '#7BE39E',
          '#A1EDB8',
          '#CEF8D6',
        ].reverse(),
      );
    scene.addLayer(layer);
  });
© Copyright 2026 Ant Group Co., Ltd..备案号:京ICP备15032932号-38
Site search
Documentation and examplesType to start searching

Search documentation, APIs, and examples

↑↓Select↵OpenEscClose