@trufi/heatmap-bars
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i @trufi/heatmap-bars

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

80.1 kB

Total Files

33

Last publish

Collaborators

  • trufi