npm.io
1.0.3 • Published 6 years ago

ee-max-value-heatmap

Licence
ISC
Version
1.0.3
Deps
0
Size
7 kB
Vulns
0
Weekly
0

Heatmap based on max value

This is the heatmap library on top of deck .gl. It decides color based on max value of nearest points.

Installation

Using npm.

npm install ee-max-value-heatmap

Usage

import MaxValueHeatmap from 'ee-max-value-heatmap';
import { Deck } from '@deck.gl/core';

let deck = new Deck({
                canvas: 'deck-canvas',
                width: '100%',
                height: '100%',
                initialViewState: INITIAL_VIEW_STATE,
                controller: true
});
const HEATMAP_LAYER = new MaxValueHeatmap({
                id: 'heatmap',
                data,
                opacity: 0.9,
                getPosition: d => d.geometry.coordinates,
                getWeight: d => d.properties.value
            });
deck.setProps({
                layers: [HEATMAP_LAYER]
            });

License

ISC