I want to make a map with points and a responsive heatmap using crosstalk in R. Like this:
library(crosstalk)
library(leaflet)
library(DT)
# Wrap data frame in SharedData
sd <- SharedData$new(quakes[sample(nrow(quakes), 10),])
bscols(
# Create a filter input
filter_slider("mag", "Magnitude", sd, column=~mag, step=0.1, width=250),
leaflet(sd) %>% addTiles() %>% addMarkers() %>% addHeatmap())
)
But, as can be observed after running the code, this way doesn't get the responsive effect on the heatmap when filtering
How can I achieve the effect?