jupyter-widgets / ipyleaflet

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

Vector tile layer opacity and visible #1210

Closed lopezvoliver closed 2 weeks ago

lopezvoliver commented 2 weeks ago

This PR adds the missing visible and opacity traits/attributes in vector tile layers, so now it's possible to control the opacity and visibility of these layers using custom widgets.

Here's how it looks like using a custom widget with a checkbox (linked to visible) and a slider (linked to opacity):

ipyleaflet_opacity_visible

This solves the downstream leafmap issue associated with its custom layer control toolbar:

leafmap_opacity_visible

martinRenou commented 2 weeks ago

I believe the failures are unrelated..