FeatureLayer - getting just the newly added features?

474
1
07-03-2010 12:46 PM
Joachim_EckboJuell
New Contributor III
Hi,

I have an OnDemand FeatureLayer. And I need to do something with each Graphic that is added (eg. setting the ZIndex). Is there a way to get the collection of the added graphics in each Update? Looping through all the graphics in the layer in the UpdateCompleted, seems a bit overkill.

One more question 🙂 When I set the FeatureLayer to invisible, why is it making an initial request fetching a lot of features anyway?
0 Kudos
1 Reply
dotMorten_esri
Esri Notable Contributor
An "Update" re-executes the query for the layer and replaces exisiting features with new, so there is not a list of "just changed and/or added features". Therefore your only option is to iterate on all the features. However I doubt that should really be of much concern. Iterating 1000s of features can be done in a split second. I'm often doing complex LINQ joins and queries on large amounts of the data, and haven't seen any major performance hit (drawing a vast amount of features seems to be the bottleneck long before any other operation).
0 Kudos