Select to view content in your preferred language

is there a FeatureLayer OnLoad event (or equivalent)

2565
1
Jump to solution
12-18-2013 04:41 AM
Labels (1)
JustinShepard
Deactivated User
I'm setting up a Runtime for WPF application and need to respond after a specific layer is loaded. I've tried the Map Loaded method but that doesn't come back when all layers have completed loading. Using map loaded, the feature layer that I need to listen for will show up but none of the graphics have loaded yet. I need to wait for the layer to load completely (i.e. all graphics are done loading).

Any ideas are appreciated. Hopefully I'm just missing a simple solution to this.
0 Kudos
1 Solution

Accepted Solutions
MichaelBranscomb
Esri Frequent Contributor
Hi,

There are a couple of events you might be interested in:

LayersInitialized http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli...
- This occurs when all layers in the LayerCollection (Map.Layers) have initialized. Initialized means that the Layer properties have been set (spatial reference, etc) but the layer may not contain any data (e.g. tiles, features) and probably will not have actually rendered on the Map at this point. Requests for data are typically asynchronous and therefore layers are populated and are rendered on the map as the data arrives.

FeatureLayer.Initialized http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli...
- This occurs when the specific FeatureLayer has initialized. Again this means that Layer properties have been set but the layer does not contain any data and is not rendered at this point.

FeatureLayer.UpdateCompleted http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli...
- This event occurs after the FeatureLayer has submitted a Query request to retrieve features and those features have arrived and been processed in the Layer.

Finally, you should also take a look at the FeatureLayer.Mode property, which takes a QueryMode enum value and determines the layer behaviour with respect to requesting features: http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli....

Cheers

Mike

View solution in original post

0 Kudos
1 Reply
MichaelBranscomb
Esri Frequent Contributor
Hi,

There are a couple of events you might be interested in:

LayersInitialized http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli...
- This occurs when all layers in the LayerCollection (Map.Layers) have initialized. Initialized means that the Layer properties have been set (spatial reference, etc) but the layer may not contain any data (e.g. tiles, features) and probably will not have actually rendered on the Map at this point. Requests for data are typically asynchronous and therefore layers are populated and are rendered on the map as the data arrives.

FeatureLayer.Initialized http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli...
- This occurs when the specific FeatureLayer has initialized. Again this means that Layer properties have been set but the layer does not contain any data and is not rendered at this point.

FeatureLayer.UpdateCompleted http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli...
- This event occurs after the FeatureLayer has submitted a Query request to retrieve features and those features have arrived and been processed in the Layer.

Finally, you should also take a look at the FeatureLayer.Mode property, which takes a QueryMode enum value and determines the layer behaviour with respect to requesting features: http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli....

Cheers

Mike
0 Kudos