Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.57 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.57 KB

heatmap-bars

Plugin to add heatmap bars to your 2GIS MapGL map.

preview

See demo examples:

Using

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);
});