0.0.1 • Published 2 years ago

@trufi/heatmap-bars v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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