/// <summary> /// 地图导航:实例化Icommand类中的控制地图全览的方法,创建在axGlobalControl中,点击鼠标实现 /// 并将axGlobalControl的currentTool属性设置为cmd /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void navigation_Click_1(object sender, EventArgs e) { ICommand cmd = new ControlsGlobeNavigateToolClass(); cmd.OnCreate(axGlobeControl1.Object); cmd.OnClick(); axGlobeControl1.CurrentTool = cmd as ITool; }
//浏览工具 public static void Navigate(AxGlobeControl _axGlobeControl) { ICommand pCommand; pCommand = new ControlsGlobeNavigateToolClass(); pCommand.OnCreate(_axGlobeControl.Object); _axGlobeControl.CurrentTool = (ITool)pCommand; }