Hello,
I have a layer and I can control its visibility. I now need to be able to control the individual features visibility of a layer. I have tried the following with no success. How can I accomplish this without removing the feature from the layer? I don’t want to remove the feature from the layer because I would like to allow the user to toggle the features visibility on the map.
publicvoidHideFeatureOnLayer(stringlayerName, ObservableCollection<string> featureIds){FeatureLayer connectingFeatureLayer = GetFeatureLayerByName(layerName);connectingFeatureLayer.FeatureSource.FeatureIdsToExclude.Clear();
foreach(stringfeatureIdinfeatureIds){connectingFeatureLayer.FeatureSource.FeatureIdsToExclude.Add(featureId);}RefreshFeatureLayersGroup(layerName);}