Leaflet / Leaflet.heat

A tiny, simple and fast heatmap plugin for Leaflet.
http://leaflet.github.io/Leaflet.heat/demo
BSD 2-Clause "Simplified" License
1.55k stars 525 forks source link

Heatmap canvas obscures the SVG shapes #73

Closed explorer14 closed 8 years ago

explorer14 commented 8 years ago

Hi,

My use case is as follows, I draw a shape (using the leaflet-draw plugin for shape drawing and editing) on the map to query some locations from a database in an area covered by that shape and show them on a map. I am also attaching a hover over label to the shape to show what data the locations represent. See screenshot below:

image

The problem is when I do a similar thing but with heatmap instead of markers, I lose the connection with the shape because the heatmap canvas gets placed on top of the svg shapes and I can't see the label anymore. Not only that I can't even remove the shape anymore because of this.

image

Is there a way to get around this problem in the current implementation of the leaflet-heat?

Thanks a bunch Aman

explorer14 commented 8 years ago

Ok I think I might have found a way around this. I will see if I can submit a pull request with the change because I think it could be useful for others as well.

Cheers Aman