Leaflet Map Panes
Influenza A virus subtype H5N1 novel characteristic inwards the Leaflet mapping platform is custom map panes, which allow you lot to customize the social club of map features such as: the base of operations map, map labels, markers as well as pop-ups.
The Leaflet documentation has a smashing introduction into What Are Map Panes? as well as includes a demo map showing how you lot tin cease purpose z-index to social club your map panes. The demo map shows you lot how to ensure map labels seem on summit of a GeoJSON layer, as well as then that the labels are non hidden behind the GeoJSON data.
It occurred to me that you lot could too add together a push clit to command the adding as well as / or removing of a custom map pane on your base of operations map. For example, inwards the demo map, a push clit could live on used to allow users to plough the map labels on or off.
You tin cease too adapt the opacity of a custom map pane. Therefore non alone tin cease you lot plough a custom pane on or off you lot tin cease too fade it inwards as well as out on the map. I've created my ain demo map of custom map panes, which shows how you lot tin cease fade custom map panes inwards as well as out on the map. In the demo map you lot tin cease plough the map labels, map marking as well as cherry-red circle on as well as off using the buttons at the bottom of the map.
It's alone a piddling map UX termination but I similar it.