leaflet-list-markers
leaflet-list-markers copied to clipboard
List outside
Hey, is it possible to get the marker list outside the map?
I am at my mobile at the moment, will have a closer look later at Home.
Great work, thanks Stefano!!
no, sorrry this plugin is not thiked for this purpose
If you want to insert the marker list outside your map, you can insert it into another <div>
.
For example:
//initiate your marker list
var list = new L.Control.ListMarkers({layer: myLayer});
map.addControl(list);
//put it into the div "target_div"
var htmlObject = list.getContainer();
var a = document.getElementById('target_div');
function setParent(el, newParent)
{
newParent.appendChild(el);
}
setParent(htmlObject, a);
Cool, thanks!!
I will check it out.. long time ago, that I worked on this project. I stucked, but this should help me moving forward.
Thanks again :+1: