Leaflet.heat icon indicating copy to clipboard operation
Leaflet.heat copied to clipboard

option to change size of heatmap layer

Open schlompf opened this issue 10 years ago • 3 comments

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"?

schlompf avatar May 18 '14 09:05 schlompf

Yep, possible and not hard to do.

mourner avatar May 18 '14 10:05 mourner

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? :)

schlompf avatar May 18 '14 11:05 schlompf

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

felipexy avatar Sep 07 '23 20:09 felipexy