jupyter-widgets / ipyleaflet

A Jupyter - Leaflet.js bridge
https://ipyleaflet.readthedocs.io
MIT License
1.47k stars 361 forks source link

fix: make the layer group visibility togglable #1129

Open 12rambau opened 1 year ago

12rambau commented 1 year ago

Fix https://github.com/jupyter-widgets/ipyleaflet/issues/1118

In this PR I added a visible boolean trait to the LayerGroup. When updated, all the underlying laayers are changed accordingly allowing the user to hide all layers with 1 line:

layer_group.visible = False

Could you let me know if it makes sense for you before I code tests and run linting process ?