block by danagerous df8c2677143f6c1a5ec14f1efcf5576b

Leaflet layer toggling

Full Screen

Showing the functionality of toggling layers in Leaflet while preserving their reference for later usage (i.e. turning the layer back on). This is useful when working with many layers in leaflet and turning opacity to 0 won’t cut it because it can have negative effects when hover and click events require properly layered DOM elements.

Important takeaways:

index.html