Hi - I would to select features from a specific layer using the map tool. I've found the snippet below, but it selects features from the top-most layer in the toc only:
return QueuedTask.Run(() =>
{
var mapView = MapView.Active;
if (mapView == null)
return true;
//Get all the features that intersect the sketch geometry and flash them in the view.
var results = mapView.GetFeatures(geometry);
return true;
});
is there anyway to specify the layer by name like the code below and then perform the select/get features on the specified layer only:
var layer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().First(l => l.Name.Equals("MSA_Class"));
Thanks
Pete