ArcGIS Pro获得一个要素图层一种方法
private FeatureLayer GetFeatureLayerByName(Map map, string layerName) {
var featureLayers = map.GetLayersAsFlattenedList().OfType<FeatureLayer>();
foreach (var layer in featureLayers) {
if (layer.Name.Equals(layerName, StringComparison.CurrentCultureIgnoreCase))
return layer;
}
return null;
}