Hi all...When iterating query results, is there an easy way to detect if the feature already exists in the current graphicsLayer?
For Each feature As Graphic In e.FeatureSet.Features
Dim graph As Graphic = feature
Dim myAddedGraphic = (From a In graphicsLayer.Graphics Select a Where a.Equals(graph)).First()
If myAddedGraphic Is Nothing Then
graphicsLayer.Graphics.Insert(0, feature)
End If
Next
This isn't working. I tried Where a IS graph, where a.Geometery.Equals(graph.Geometry) etc..I just can't seem to use LINQ to find the item if it exists in the list. Any else get this working?