Open 12rambau opened 2 years ago
You can use panes with zIndex
.
Leaflet also has a bringToFront method. I think it could be nice to expose it in ipyleaflet.
these 2 tricks are working but they are not changing the value selected in the layer control ? So once it's done if I want to come back to the OpenTopoMap it won't work right?
The user can select the OpenTopoMap from the layer control, it should work. If you want to do it from the back-end, you can probably remove the OpenTopoMap from the map, then add it again with a different pane.
IF I create a map with multiple basemaps, only one can be displayed at the time. At first I thought the one displayed is the last added but when using with Voila, the result is random and sometime the first sometimes the second is selected. Is there a way to programatically select the basemap being displayed when the map is first rendered ?
here is a small exemple with 2 basemaps where I would like to see openstreemap selected: