leaflet.extras
leaflet.extras copied to clipboard
Heatmap
You wrote in your documentation of the Heatmap plugin on http://rpubs.com/bhaskarvk/leaflet-heat, that it's possible to set the size in meters and used the code
leaflet(df) %>% addProviderTiles(providers$CartoDB.Positron) %>% addHeatmap(lng=~lng, lat=~lat, blur = 20, max = 0.05, radius = 15 )
but in this code the size is changing by zooming in and out which souldn't happen with a radius in meters.
I will have to look, but for setting the size in meters you've got to use addWebGLHeatMap
, because unfortunately the regular heatmap plugin doesn't support that option but the webglheatmap plugin does. Mind you the webglheatmap plugin has performance problems beyond a certain number of points (> 100K I think).
See example here http://rpubs.com/bhaskarvk/leaflet-heatmap
May be @RCura can chime in, he uses the heatmap functionality quite often and was the expert I worked with when implementing the heatmap functions.