Leaflet heatmap using TileLayer
Heatmap in Leaflet (https://thanh-taro.github.io/leaflet-heatmap).
Install
You need Leaflet >= 1.0.0 and include dist/L.HeatMap.min.js
Quick start
// map is your map instancevar options = opacity: 05 useCanvas: false;var heatMap = L;
Options
There are a few options that you can use
- options.colors - Array Colors map (from 0 to 255), default is rainbow.
- options.filters - Array Colors range for filter, default is 0, 255
- options.opacity - Number Opacity of heatmap, default is 1.
- options.useCanvas - Boolean Use canvas instead of img, default is true.
API
- setColors(colors)
- setFilters(range)
- setOpacity(opacity)
- useCanvas(useOrNot)
Demo
You can find a demo here: https://thanh-taro.github.io/leaflet-heatmap
License
This is released under the MIT licence.