zoukankan      html  css  js  c++  java
  • ArcGIS Engine中添加点、线、面元素

    转自原文ArcGIS Engine中添加点、线、面元素

    //画点
    IPoint pt = axMapControl1.ToMapPoint(e.x, e.y);
    IMarkerElement pMarkerElement = new MarkerElementClass();
    IElement pElement = pMarkerElement as IElement;
    pElement.Geometry = pt;
    IGraphicsContainer pGraphicsContainer = pMap as IGraphicsContainer;
    pGraphicsContainer.AddElement((IElement)pMarkerElement, 0);
    pActiveView.Refresh();

    //画线
    IGeometry polyline = axMapControl1.TrackLine();
    ILineElement pLineElement = new LineElementClass();
    IElement pElement = pLineElement as IElement;
    pElement.Geometry = polyline;
    IGraphicsContainer pGraphicsContainer = pMap as IGraphicsContainer;
    pGraphicsContainer.AddElement((IElement)pLineElement, 0);
    pActiveView.Refresh();

    //画面
    IGeometry Polygon = axMapControl1.TrackPolygon();
    IPolygonElement PolygonElement = new PolygonElementClass();
    IElement pElement = PolygonElement as IElement;
    pElement.Geometry = Polygon;
    pGraphicsContainer = pMap as IGraphicsContainer;
    pGraphicsContainer.AddElement((IElement)PolygonElement, 0);
    pActiveView.Refresh();
  • 相关阅读:
    pytest_04
    pytest_03
    pytest_02
    CF 1416C XOR Trie
    CF 1413D
    ZOJ 3725 概率dp
    ZOJ 3726
    位运算
    CF1439C 线段树
    unordered_set
  • 原文地址:https://www.cnblogs.com/arxive/p/6305419.html
Copyright © 2011-2022 走看看