Repository navigation
Heatmaps and coverage grids
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. Optionsweight,radiusorradiusMeters,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 (cellSizein screen pixels, orcellMetersfixed on the ground), each colored by the mean/max/min/sum/count of its values throughbreaks- an nPerf-style signal coverage map. Clicking a cell shows its value and callsonClick(cell). Optional legend.
Both return { setData, setOptions, show, hide, remove }.
maptools.js - exportMapImage includes heatmaps and grids in the PNG.