zoukankan      html  css  js  c++  java
  • 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();

    }

  • 相关阅读:
    Eclipse慢慢学会的快捷键
    换行和flush()
    接口Interface
    对象的转型
    抽象类和抽象函数
    BufferedReader
    FileInputStream和FileReader
    Unable to instantiate receiver XXXXXX
    声明对象和定义数组
    Eclipse中文乱码问题
  • 原文地址:https://www.cnblogs.com/jinqier/p/2525037.html
Copyright © 2011-2022 走看看