leaflet each layer code example Example: leaflet each layer var idstore = []; map.eachLayer(function(layer){ // ... });