zoukankan      html  css  js  c++  java
  • 鹰眼完全实现

    1 arcengine c# 鹰眼 完全实现

    private void axMap1_OnExtentUpdated(object sender, ESRI.ArcGIS.MapControl.IMapControlEvents2_OnExtentUpdatedEvent e)
    {
    IEnvelope pNewMainEnv = (IEnvelope)axMap1.Extent.Envelope;

    IGraphicsContainer pGraphCon = axMapEagle.Map as IGraphicsContainer;
    IActiveView pActiveView = pGraphCon as IActiveView;
    pGraphCon.DeleteAllElements();

    IRectangleElement pRectEle = new RectangleElementClass();
    IElement pEle = pRectEle as IElement;
    pEle.Geometry =pNewMainEnv;

    IRgbColor pColor = new RgbColorClass();
    pColor.Red = 225;
    pColor.Green = 0;
    pColor.Blue =0;
    pColor.Transparency = 225;

    ILineSymbol pOutline = new SimpleLineSymbolClass();
    pOutline.Width = 1;
    pOutline.Color = pColor;

    pColor = new RgbColorClass();
    pColor.Red = 225;
    pColor.Green = 0;
    pColor.Blue = 0;
    pColor.Transparency = 0;

    IFillSymbol pFillSymbol = new SimpleFillSymbolClass();
    pFillSymbol.Color = pColor;
    pFillSymbol.Outline = pOutline;

    IFillShapeElement pFillShapeEle = pEle as IFillShapeElement;
    pFillShapeEle.Symbol = pFillSymbol;

    pGraphCon.AddElement((IElement)pFillShapeEle, 0);
    //转载请注明 arcengine吧 http://tieba.baidu.com/f?kw=arcengine

    pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null); 
    }

    private void axMapEagle_OnMouseDown(object sender, ESRI.ArcGIS.MapControl.IMapControlEvents2_OnMouseDownEvent e)
    {
    IPoint pPoint=new PointClass();
    pPoint.PutCoords(e.mapX,e.mapY);
    axMap1.CenterAt(pPoint);

    }

    private void axMap1_OnMapReplaced(object sender, ESRI.ArcGIS.MapControl.IMapControlEvents2_OnMapReplacedEvent e)
    {
    axMapEagle.LoadMxFile(axMap1.DocumentFilename,null,null);
    axMapEagle.Extent=axMapEagle.FullExtent;
    }

    #endregion -鹰眼
  • 相关阅读:
    爱因斯坦谜题的真正答案
    Lucence 中的排序算法解析
    XML 解析中,如何排除控制字符
    如何在百度贴吧里加入自己的广告图片
    ASP.NET 不能调试的几种情况
    Zend_Search_Lucence 中用UTF8 编码建立索引的问题
    c++继承中的内存布局 <转>
    Effective C++ 学习笔记(20)
    Effective C++ 学习笔记(19)
    Effective C++ 学习笔记(17)
  • 原文地址:https://www.cnblogs.com/zhangjun1130/p/1413031.html
Copyright © 2011-2022 走看看