Hello,
Let say that I am getting two copies of the same feature from a ShapefileFeatureLayer and I want to add those two features to the same InMemoryFeatureLayer. I know how to do that with InternalFeatures.Add that allows you to set a different key for each copies of the features. But how do I do the same thing using EditTools which is the prefered way?
As you can see below in my code, I have that working with InternalFeatures.Add but how can I do the same thing with EditTools? Thank you.
Dim staticOverlay As LayerOverlay = CType(WinformsMap1.Overlays(0), LayerOverlay)
Dim Layer1 As ShapeFileFeatureLayer = CType(staticOverlay.Layers("Layer1"), ShapeFileFeatureLayer)
Dim dynamicOverlay As LayerOverlay = CType(WinformsMap1.Overlays(1), LayerOverlay)
Dim inMemoryFeatureLayer As InMemoryFeatureLayer = CType(dynamicOverlay.Layers("Highlight"), InMemoryFeatureLayer)
Layer1.Open()
Dim feature As Feature = Layer1.QueryTools.GetFeatureById("47", ReturningColumnsType.AllColumns)
Layer1.Close()
Dim feature2 As Feature = feature.CloneDeep(ReturningColumnsType.AllColumns)
Dim guid As String = System.Guid.NewGuid.ToString()
Dim guid2 As String = System.Guid.NewGuid.ToString()
inMemoryFeatureLayer.InternalFeatures.Add(guid, feature)
inMemoryFeatureLayer.InternalFeatures.Add(guid2, feature2)