Tag Info

New answers tagged

2

You need to keep track of your markers in an array. var markerArray = []; Every time you add a marker you push it to the array. var marker = new L.marker(...); markerArray.push(marker); Then if you wanted to apply some event listener to each of the markers you just iterate over that list. for(var i=0;i<markerArray.length;i++){ ...



Top 50 recent answers are included