I am trying to remove a feature from an InMemoryFeatureLayer. I first saw the internalfeatures.remove method and tried this, although it says this is obsolote and you will need to call the buildindex method later. I have tried deleting by passing the actual feature itself and by using the id. Neither seem to do anything and the feature is not deleted.
I have also tried using the featuresource.deletefeature method. I get the same results. I am beginning and closing a transaction whne I do this way
cbLayer.QueryTools.GetFeaturesContaining(
cbLayer.FeatureSource.Open()Dim editFeaturesClicked As Collection(Of Feature) = _ClickedPoint, ReturningColumnsType.AllColumns)If editFeaturesClicked.Count > 0 Then
Map1.EditOverlay.Features.Clear()
Map1.EditOverlay.Features.Add(editFeaturesClicked(0))
cbLayer.InternalFeatures.Remove(editFeaturesClicked(0).Id)
cbLayer.BuildIndex()
cbOverlay.Redraw()
'TODO: handle multiple shapes clicked
End If.