【ArcGIS Engine二次开发(基于c#)】在MapControl绘制多边形

it2023-07-28  73

在MapControl绘制多边形

MapControl的OnMouseDown事件

主要代码:

private void axMapControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e) {   IGeometry pGe = axMapControl1.TrackPolygon();   IElement pElement = new PolygonElementClass() as IElement;   pElement.Geometry = pGe;   IGraphicsContainer GraphicsContainer = axMapControl1.Map as IGraphicsContainer;   GraphicsContainer.AddElement(pElement, 0);   axMapControl1.ActiveView.Refresh(); }
最新回复(0)