• 缩放到被选择的部分: ICommand Cmd = new ControlsZoomToSelectedCommandClass();


     AddItem("esriControls.ControlsZoomToSelectedCommand"); //ICommand Cmd = new ControlsZoomToSelectedCommandClass(); 

    缩放到被选择的部分: ICommand Cmd = new ControlsZoomToSelectedCommandClass();

     IGeometry pGeometry = null;
                string m = ArcGISPub.ArcGISToolPub.getMatch();
                if (FBFExtent) //按发包方范围
                {
                    string ZJQYDM = 承包方编码.Substring(0, 14);
    
                    IFeatureSelection pFeatureSelection = ArcGISPub.ArcGISClassPub.getFeatureSelect(ZJQYFeatureLayer, "ZJQYDM like '" + m + ZJQYDM + m + "'");
                    pGeometry = ArcGISPub.ArcGISClassPub.GetFeatureLayerSelectGeometry(ZJQYFeatureLayer);
                    ArcGISPub.ArcGISToolPub.RunCommand("esriControls.ControlsZoomToSelectedCommand", m_application);//ControlsZoomToSelectedCommand  esriControls.ControlsZoomToSelectedCommand,{06DD3F57-CF78-41BA-83F4-D13A8679914F}
    
                    pFeatureSelection.Clear();
    
    
    
                }
                else
                {
    
                    IFeatureSelection pFeatureSelection = ArcGISPub.ArcGISClassPub.getFeatureSelect(DKFeatureLayer, "承包方编码 like '" + m + 承包方编码 + m + "'");
                    int num = pFeatureSelection.SelectionSet.Count;
                    if (num > 0)
                    {
                        pGeometry = ArcGISPub.ArcGISClassPub.GetFeatureLayerSelectGeometry(DKFeatureLayer);
                        ArcGISPub.ArcGISToolPub.RunCommand("esriControls.ControlsZoomToSelectedCommand", m_application);//ControlsZoomToSelectedCommand  esriControls.ControlsZoomToSelectedCommand,{06DD3F57-CF78-41BA-83F4-D13A8679914F}
                        m_hookHelper.ActiveView.Refresh();
                        pFeatureSelection.Clear();
                    }
    
                }
    
                IEnvelope pEnvelope = pGeometry.Envelope;
                return pGeometry.Envelope;
    
    
            }
    

      

  • 相关阅读:
    Ubuntu下UFW防火墙简单设置
    ubuntu设置tomcat开机自动启动
    ubuntu16.04编辑器vi的使用
    Several ports (8005, 8080, 8009) required
    JavaScript检测浏览器(Firefox、IE)是否安装指定插件
    mongo 初级使用
    @Scheduled(cron = "0 0 * * * ?")实现定时任务
    Calendar时间类型数据设置
    Maven+STS工程中Maven Dependencies 文件夹丢失问题
    redis安装以及远程连接
  • 原文地址:https://www.cnblogs.com/gisoracle/p/8295451.html
Copyright © 2020-2023  润新知