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();
}
作者:jinqier
出处:http://www.cnblogs.com/jinqier/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。