Skip to content

Heatmap layer for leaflet using CSS radial gradients and divIcon class

Notifications You must be signed in to change notification settings

agentor/leaflet-div-heatmap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Heatmap layer for leaflet using CSS radial gradients and divIcon class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published