Skip to content

Heatmaps and coverage grids

Choose a tag to compare

@github-actions github-actions released this 10 Nov 22:31
· 56 commits to main since this release

mapheat.js (new) - heatmaps and coverage grids from point data (GeoJSON points or [lng, lat, value] arrays), drawn on one canvas above the basemap and below addGeoJSON layers.

  • addHeatmap(id, data, options) - smooth density, blue to red. Options weight, radius or radiusMeters, max (default: highest density in view), scale (linear/sqrt/log), gradient, opacity, legend. 50,000 points redraw in about 15 ms.
  • addGridMap(id, data, options) - points binned into square or hexagon cells (cellSize in screen pixels, or cellMeters fixed on the ground), each colored by the mean/max/min/sum/count of its values through breaks - an nPerf-style signal coverage map. Clicking a cell shows its value and calls onClick(cell). Optional legend.

Both return { setData, setOptions, show, hide, remove }.

maptools.js - exportMapImage includes heatmaps and grids in the PNG.