notification when layer finished loading data?

707
0
11-07-2012 11:41 AM
AndyJames
New Contributor
I need to know when a given layer has finished loading its shapes from the server.  I have a map view layer delegate set on my map view.  My methods get called for LayerDidLoad and such, however, they are getting called BEFORE the layer is finished loading shapes from the server.  In other words, I expected that once LayerDidLoad was called, I could access the "graphics" property of my feature layer.  That is not the case.  What am I missing?

This is the same problem reported by: http://forums.arcgis.com/threads/63851-Wait-Until-AGSFeatureLayer-loaded-successfully but was never solved.  He ended up using a cheesy timer solution.

This is the same problem reported by:  http://forums.arcgis.com/threads/60830-Access-Graphics-on-AGSFeatureLayer and was answered by a senior ESRI member stating there is no way in the SDK to know.  I do not want to change the graphics array, but just know if it is of size 0 or not.

In other words, I want to know if my user setup a filter (layer definitionExpression) such that no graphics pass the filter and the map is empty, such that I can automatically zoom out to the full extent of the layer.
0 Kudos
0 Replies