1、图层选择集
IFeatureLayer pLayer = GIS.BasciClass.MapManger.GetLayerByName(pMap, pLayerName) as IFeatureLayer;IFeatureSelection pSelection = pLayer as IFeatureSelection;
ISelectionSet pSelectSet = pSelection.SelectionSet;
pSelectSet.Search(null, false, out pCursor);
2、图层选择集
IFeatureSelection pSelection = player as IFeatureSelection;
IQueryFilter pQuery = new QueryFilterClass();
pQuery.WhereClause = where_clause;
pSelection.SelectFeatures(pQuery, esriSelectionResultEnum.esriSelectionResultNew, false);
pSelection.SelectionSymbol = pSymbol;
ISelectionSet pSelectionSet = pSelection.SelectionSet;
3、地图选择集
ISelection selection = pMap.FeatureSelection;
IEnumFeatureSetup enumFeatureSetup = selection as IEnumFeatureSetup; //这里很必要
enumFeatureSetup.AllFields = true;
//这里很必要
IEnumFeature enumFeature = enumFeatureSetup as IEnumFeature;
enumFeature.Reset();
IFeature feature = enumFeature.Next();
4、选择集颜色设置
ISelectionEnvironment pSelectionEnvironment = new SelectionEnvironmentClass();
pSelectionEnvironment.DefaultColor = MapManger.ConvertColorToIColor(Color.Red);