Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielepiccone/leaflet-div-heatmap
Heatmap layer for leaflet using CSS radial gradients and divIcon class
https://github.com/danielepiccone/leaflet-div-heatmap
Last synced: 5 days ago
JSON representation
Heatmap layer for leaflet using CSS radial gradients and divIcon class
- Host: GitHub
- URL: https://github.com/danielepiccone/leaflet-div-heatmap
- Owner: danielepiccone
- Created: 2013-10-07T17:06:26.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2017-10-08T13:44:29.000Z (about 7 years ago)
- Last Synced: 2024-10-11T18:42:36.287Z (28 days ago)
- Language: CSS
- Size: 48.8 KB
- Stars: 21
- Watchers: 2
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-starred - danielepiccone/leaflet-div-heatmap - Heatmap layer for leaflet using CSS radial gradients and divIcon class (others)
README
# Leaflet divHeatmap Layer
Lightweight implementation of an heatmap layer for leaflet using CSS3 and divIcon
## Use
```
var divHeatmapLayer = new L.DivHeatmapLayer();
```### Options
```
{
clickable: true or false, // divHeatmapLayer.on('click',function() {...});
radius: 100,
gradient: true or false, // Make solid blobs
color: '255,0,0' or '#FF0000'
}
```## Methods:
### .setData(data)
Loads an array of data points:```
var data = [
{
lat:10,
lon:12,
value:1
},
{
...
}
];
```### .getData()
Returns the dataset in the heatmap.### .clearData()
Clears all the data.### .morphData(data)
Load a new dataset performing a fadeOut on the old data and a fadeIn on the new data.### .fadeInData(data)
Loads an array of data points fading.### .fadeOutData()
Removes the current data making it fade out.## To Do
- Callbacks for animations
- Support for CSS animations