react-map-gl-heatmap-overlay
A heatmap overlay for react-map-gl built using webgl-heatmap originally created by Florian Boesch.
Usage
var HeatmapOverlay = ;var cities = ;
Where each element in cities looks like: {longitude, latitude}
.
{ return <MapGL ...viewport> <HeatmapOverlay locations=cities ...viewport/> </MapGL>; }
The locations
prop can be an array or ImmutableJS List.
Accessors
Data accessors can be provided if your data doesn't fit the expected
{longitude, latitude}
form.
{ return <MapGL ...viewport> <HeatmapOverlay locations=houses ...viewport lngLatAccessor= house house /> </MapGL>; }
Other accessors and their defaults:
{1 / 10} 40 // If not specified, defaults to Viridis. gradientColors: Immutable
Installation
npm install react-map-gl-heatmap-overlay
Developing
npm run start
To run the example.
Attribution
The included example uses raster tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.