Skip to content

Trufi/heatmap-bars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

aab04a1 · May 14, 2024

History

25 Commits
Aug 7, 2022
May 14, 2024
Feb 14, 2022
Feb 14, 2022
Mar 5, 2020
Feb 14, 2022
Aug 7, 2022
Aug 7, 2022
Aug 7, 2022
Mar 5, 2020
Aug 7, 2022
Feb 14, 2022
Feb 14, 2022
Feb 14, 2022

Repository files navigation

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