Arcengine画点的代码

private void axMapControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e)
{

IElement pElement;
IMarkerElement pMarkerElement;
ISimpleMarkerSymbol pSimpleMarkerSymbol;
IRgbColor pRgbColor;
pSimpleMarkerSymbol = new SimpleMarkerSymbolClass();
pRgbColor = new RgbColorClass();
pRgbColor.Red = 255;
pSimpleMarkerSymbol.Color = pRgbColor;
pSimpleMarkerSymbol.Style = esriSimpleMarkerStyle.esriSMSCross ;
pMarkerElement = new MarkerElementClass();
pMarkerElement.Symbol = pSimpleMarkerSymbol;
pElement = new MarkerElement();
pElement = pMarkerElement as IElement;
pElement.Geometry = axMapControl1.ActiveView.ScreenDisplay.DisplayTransformation. ToMapPoint(e.x, e.y);
IGraphicsContainer pGraphicsContainer = axMapControl1.ActiveView.FocusMap as IGraphicsContainer;
pGraphicsContainer.AddElement(pElement, 0);
axMapControl1.ActiveView.Refresh();

}

原文地址:https://www.cnblogs.com/jinqier/p/2525037.html