// 思路将feature加入至集合

IFeatureCursor pFeatureCursor = pFeatureLayer.Search(null, true);

IFeature pFeature = pFeatureCursor.NextFeature();

ISymbol symbol = CreateSimpleSymbol(pFeature.Shape.GeometryType);

if (pFeature != null)

{

IGeometryCollection pGeometryCollention =new  PolygonClass();

object missing = Type.Missing;

while (pFeature != null)

{

  // 将feature 加入至集合

pGeometryCollention.AddGeometryCollection(pFeature.Shape as IGeometryCollection);

pFeature = pFeatureCursor.NextFeature();

}

    axMapControl1.FlashShape((IGeometry)pGeometryCollention, 3,150 , symbol);

 }

转载于:https://www.cnblogs.com/oftenlin/archive/2012/09/05/2671993.html

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐