rstudio / crosstalk

Inter-htmlwidget communication for R (with and without Shiny)
http://rstudio.github.io/crosstalk
Other
288 stars 52 forks source link

Crosstalk interacting with Leaflet with select boxes shows all data when no selection made #121

Open mmfc opened 2 years ago

mmfc commented 2 years ago

Hi,

I'm trying to generate a static rmd html file using leaflet and crosstalk. I want a map that displays no data when two checkboxes in the sidebar are unchecked. Currently, when all checkboxes are unchecked, all data is displayed on the map (rather than none). When one of the checkboxes is checked, the correct subset of the shared dataframe is displayed.

Crosstalk 1.1.1, leaflet 2.0.4.1

Does anyone have any advice?

paragemini commented 2 years ago

I am also looking for this feature. Currently everything is displayed on the map but a functionality where everything is not displayed and when the user selects the checkboxes, one would only display data on map which corresponds to boxes checked @dmurdoch can ypu please help us? Or atleast give guidance on how to achieve it?

Is there something that needs to be done here : https://github.com/dmurdoch/leaflet/blob/crosstalk4/javascript/src/methods.js