面积测量

在Mapcontrol的mousedown中实现

 1 IGeometry pBuffer = m_pMapControl.TrackPolygon();
 2 IPolygon pPoly = pBuffer as IPolygon;
 3 if (pBuffer == null || pBuffer.IsEmpty)
 4        return;
 5 IArea pArea = pBuffer as IArea;
 6 double area = pArea.Area;
 7 if (pArea.Area < 0)
 8 {
 9         area = System.Math.Abs(pArea.Area);
10 }

 

posted @ 2013-08-27 17:07  寻梦放歌  阅读(245)  评论(0编辑  收藏  举报