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

option to change size of heatmap layer #11

Open schlompf opened 10 years ago

schlompf commented 10 years ago

is it possible to add an option to leaflet.heat to expand the heatmap layer beyond the size of the map-view, say triple the length & height? so that when a user pans, the heatmap is not cutt off and instead feels "continous"?

mourner commented 10 years ago

Yep, possible and not hard to do.

schlompf commented 10 years ago

this https://gist.github.com/schlompf/c07792aea89fcd8627a7 sort of works. right and bottom edge behave as expected ;) for left and top edge, i probably have to change line 105 to [-size.x, -size.y] so that the canvas layer is centered again, but then all my points are offset. And the offest for the scaling is still wrong.

do you mind pointing out the lines i still have to change? :)

felipexy commented 1 year ago

Hi, I`m trying to solve this same problem. Can you show me how you did it? Thank you so much!