Situation: I am adding a new geoJson layer to my map and I want to animate all the markers as soon as they are added with a slight delay between them. The API seems to do everything, BUT offers a callback when the last token is added!
Code example
L.geoJson(data, { onEachFeature: function (feature, layer) { console.log(feature, layer); } }).addTo(map);
I would like
L.geoJson(data, { onEachFeature: function (feature, layer) { console.log(feature, layer); }, complete:function(layers){ console.log(layers); } }).addTo(map);
I know that each layer has an onAdd event, but similar for layerGroup?
thanks
javascript leaflet
sidonaldson
source share