I use the framework codeigniter3
bootrsap 5 called in header.php
Leaflet map cdn (in view)
leaflet.fullscreen cdn (in view)
jquery cdn (in view)
1st step in mode fullscreen off (worked fine)
<script>
$("#map").css('z-index', 0);
$(".sidebar").css('position', 'absolute')
$(".sidebar").css('z-index', 1);
$(".sidebar").draggable();
$(".card-header-sidebar").css('cursor', 'grab');
</script>
when i change fullscreen ok ( my problem )
i want to keep the sidebar visible
There are no solution for fullscreen leaflet with extern html content
Other adapted solution:
Add class hidden to sidebar ( Html element )
Create Legend on map
const legend = L.control({
position: "topleft"
});
Get html content
const legend_html = $('#sidebar').html()
Add this to map
legend.onAdd = function() {
let div = L.DomUtil.create("div", "leaflet-legend");
L.DomEvent.disableClickPropagation(div);
div.insertAdjacentHTML("beforeend", legend_html);
return div;
};
legend.addTo(map);