ArcGIS Pro图层组使用和查询
await QueuedTask.Run(() => { ReadOnlyObservableCollection<Layer> lstLays; lstLays = MapView.Active.Map.Layers; foreach (Layer lay in lstLays) { if (lay is GroupLayer) { GroupLayer pGrpLay = (GroupLayer)lay; ReadOnlyObservableCollection<Layer> featureLayers = pGrpLay.Layers; foreach (FeatureLayer fLay in featureLayers) { CIMBaseLayer fLayDef = fLay.GetDefinition(); string pLayName = fLayDef.Name; MessageBox.Show(pLayName); } } } });