Esri leaflet plugin GeoJSON layer finished loading?

5786
1
01-09-2015 07:47 PM
Labels (1)
uavalos
New Contributor

I'm using the esri leaflet plugin

 

Esri/esri-leaflet · GitHub

 

We're using a GeoJSON data layer with the plugin.

 

However, for debugging purposes, I need the following:

 

1) how can I tell when the layer has finished loading?

2) how can I access the GeoJSON data points when the layer has finished loading?

Tags (3)
0 Kudos
1 Reply
JohnGravois
Frequent Contributor

1. the featureLayer 'load' event is triggered when all graphics in the current map extent have been drawn.

L.esri.Layers.FeatureLayer | Esri Leaflet > Events > 'Load'

var myFeatureLayer = new L.esri.featureLayer(...
myFeatureLayer.on('load', function(evt){
//do something cool
});

2. not an entirely satisfying answer, but see this thread.

0 Kudos