Beispiel #1
0
        private void AxGlobeControlEx_Load(object sender, EventArgs e)
        {
            IGlobeDisplayEvents_Event m_GlobeDisplayEvents = axGlobeControl1.Globe.GlobeDisplay as IGlobeDisplayEvents_Event;

            this.MouseWheel += new MouseEventHandler(GlobleControl_MouseWheel);
            //将三维视图重绘事件委托给m_GlobeDisplayEvents_AfterDraw方法
            m_GlobeDisplayEvents.AfterDraw += new IGlobeDisplayEvents_AfterDrawEventHandler(GlobeControl_DisplayEvents_AfterDraw);
            axMapControl1.OnMouseDown      += new ESRI.ArcGIS.Controls.IMapControlEvents2_Ax_OnMouseDownEventHandler(axMapControl1_OnMouseDown);
            axMapControl1.Extent            = axMapControl1.FullExtent;

            // 初始化地图框架
            MapFrame.Logic.InitMapFrame mapFrame = new MapFrame.Logic.InitMapFrame(MapEngineType.ArcGlobe, axGlobeControl1);
            mapLogic = mapFrame.GetMapLogic();
            mfMap    = mapLogic.GetIMFMap();

            Load3dFile();   // 加载3d文档
            LoadMxdFile();

            // 自定义显示鹰眼工具
            ShowEagleEyeCmd showEagleEyeCmd = new ShowEagleEyeCmd(this);

            axToolbarControl1.AddItem(showEagleEyeCmd, -1, 22, false, -1, esriCommandStyles.esriCommandStyleIconOnly);

            globeBusiness         = new ArcGlobeBusiness(mapLogic, trackMgr);
            eagleEyePanel.Visible = false;

            InitBookmark();     // 初始化书签
        }
Beispiel #2
0
        public GlobeControl()
        {
            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);

            InitializeComponent();

            IGlobeDisplayEvents_Event m_GlobeDisplayEvents = axGlobeControl1.Globe.GlobeDisplay as IGlobeDisplayEvents_Event;

            this.MouseWheel += new MouseEventHandler(GlobleControl_MouseWheel);;
            //将三维视图重绘事件委托给m_GlobeDisplayEvents_AfterDraw方法
            m_GlobeDisplayEvents.AfterDraw += new IGlobeDisplayEvents_AfterDrawEventHandler(GlobeControl_DisplayEvents_AfterDraw);
            axMapControl1.OnMouseDown      += new ESRI.ArcGIS.Controls.IMapControlEvents2_Ax_OnMouseDownEventHandler(axMapControl1_OnMouseDown);
            axMapControl1.Extent            = axMapControl1.FullExtent;

            Load3dFile();

            ShowEagleEyeCmd showEagleEyeCmd = new ShowEagleEyeCmd(this);

            axToolbarControl1.AddItem(showEagleEyeCmd, -1, 22, false, -1, esriCommandStyles.esriCommandStyleIconOnly);
        }