In Leaflet control are overlays under basemaps. How to put them up? Just to swap position of overlayers/basemaps.
Asked
Active
Viewed 220 times
0
-
1The order of those DOM elements is determined in code, with a separator between them. You could use jQuery to swap them as suggested in this answer https://stackoverflow.com/a/38515050/3574481 – peeebeee Dec 12 '18 at 13:15
1 Answers
1
Edit, now with flex:
.leaflet-control-layers-expanded .leaflet-control-layers-list {
display:flex; flex-direction:column;}
.leaflet-control-layers-base { order:3 }
.leaflet-control-layers-separator {order:2}
Older:
.leaflet-control-layers-list {display:table; }
.leaflet-control-layers-base {display:table-footer-group; }
.leaflet-control-layers-overlays {display:table-header-group;}
.leaflet-control-layers-separator {display:none}
from: CSS table rows reorder

Martin Milichovský
- 147
- 11