zoukankan      html  css  js  c++  java
  • ArcEngine 固定比例放大缩小

    这两个功能,和全图一样简单,也是继承CommandBase基类

      public override void OnClick()
      {
          
    //Get IEnvelope interface
          IEnvelope pEnvelope = (IEnvelope)m_pActiveView.FullExtent;
          
    //Expand envelope and refresh the view
          pEnvelope.Expand(0.75, 0.75, true);
          m_pActiveView.Extent 
    = pEnvelope;
          m_pActiveView.Refresh();
      }

       pEnvelope 是当前的地图视图,假定是1平米,屏幕大小也是1平米,现在将0.75平米的地图在1平米的屏幕上显示,也就是放大了,呵呵(这样描述可能容易理解一 点)pEnvelope.Expand(0.75, 0.75, true);就是获得0.75平米的地图视图,m_pActiveView 相当于屏幕。

      同理,缩小就是将1.25平米的地图视图,在1平米的屏幕上显示。

    转自:http://tech.ddvip.com/2009-09/1253694583134090.html

  • 相关阅读:
    Pipe
    An Easy Problem?!
    Kadj Squares
    Space Ant
    Intersection
    让网页变为可编辑状态
    typescript入门基础
    大家都能看懂的 canvas基础教程
    数组的foreach方法和jQuery中的each方法
    html单行、多行文本溢出隐藏
  • 原文地址:https://www.cnblogs.com/xiangniu/p/2138378.html
Copyright © 2011-2022 走看看