Leaflet/Leaflet — pull request #2052 by sidonaldson (2013-09-27 09:49:10+00:00)
Title: All layers added callback add to GEOJSON layers

Fires a callback once all the geojson has been added to the map and returns the layers. Is useful for manipulating the layers on load such as fading them in.

example:

var demo = new L.GeoJSON.AJAX(url, {
pointToLayer: function(feature, latlng) {},
onEachFeature: function(feature, layer) {},
onComplete: function(layers){}
}).addTo(map);