Plugin to add heatmap bars to your 2GIS MapGL map.
See demo examples:
Install with npm:
npm install @trufi/heatmap-bars
Then initialize with passing MapGL Map object:
import { load } from '@2gis/mapgl';
import { Heatmap } from '@trufi/heatmap-bars';
load().then((mapgl) => {
// Initialize MapGL map
const map = new mapgl.Map('map', {
center: [82.920412, 55.030111],
zoom: 15,
key: 'YOUR MAPGL API KEY',
});
// Initialize heatmap bars
const heatmap = new Heatmap(map, 'map');
// Change heatmap options on the fly
heatmap.setOptions(heatOptions);
// Set data as number[][] grid
heatmap.setData(points);
});