Beispiel #1
0
        /// <summary>
        /// map绘制完成后发生
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void axMapControl1_OnAfterScreenDraw(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnAfterScreenDrawEvent e)
        {
            IActiveView            activeView            = (IActiveView)axPageLayoutControl1.ActiveView.FocusMap; //获得pagelayout的当前视图
            IDisplayTransformation displayTransformation = activeView.ScreenDisplay.DisplayTransformation;        //获得显示转换对象

            //根据MapControl的视图范围,确定PageLayoutControl的视图范围
            displayTransformation.VisibleBounds = axMapControl1.Extent;
            axPageLayoutControl1.ActiveView.Refresh();
            this.Presenter.copyToPageLayout();
        }
Beispiel #2
0
 /// <summary>
 /// map绘制完成后发生
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void axMapControl1_OnAfterScreenDraw(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnAfterScreenDrawEvent e)
 {
     //if (axMapControl1.LayerCount != 0) //mapcontrol不为空,和pagelayout共享数据和视图范围
     //{
     //    IActiveView activeView = (IActiveView)axPageLayoutControl1.ActiveView.FocusMap;//获得pagelayout的当前视图
     //    IDisplayTransformation displayTransformation = activeView.ScreenDisplay.DisplayTransformation;//获得显示转换对象
     //    //根据MapControl的视图范围,确定PageLayoutControl的视图范围
     //    displayTransformation.VisibleBounds = axMapControl1.Extent;
     //    axPageLayoutControl1.ActiveView.Refresh();
     //    //this.Presenter.copyToPageLayout();
     //}
 }
        private void axMapControl1_OnAfterScreenDraw(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnAfterScreenDrawEvent e)
        {
            //Set mouse pointers
            axPageLayoutControl1.MousePointer = esriControlsMousePointer.esriPointerDefault;
            axMapControl1.MousePointer        = esriControlsMousePointer.esriPointerDefault;

            if (m_bUpdateFocusMap == false)
            {
                return;
            }

            //Get IActiveView interface
            IActiveView activeView = (IActiveView)axPageLayoutControl1.ActiveView.FocusMap;

            //Get IDisplayTransformation interface
            IDisplayTransformation displayTransformation = activeView.ScreenDisplay.DisplayTransformation;

            //Set the visible extent of the focus map
            displayTransformation.VisibleBounds = axMapControl1.Extent;
            //Refresh the focus map
            activeView.Refresh();

            m_bUpdateFocusMap = false;
        }
Beispiel #4
0
 //mapcontrol和pagelayerout挂链;
 private void axMapControl1_OnAfterScreenDraw(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnAfterScreenDrawEvent e)
 {
     GISHandler.GISTools.ScreenDraw(this.axMapControl1, axPageLayoutControl1);
     GISHandler.GISTools.copyToPageLayerOut(this.axMapControl1, axPageLayoutControl1);
 }