arcglobe二次开发1实习指导书_第1页
arcglobe二次开发1实习指导书_第2页
arcglobe二次开发1实习指导书_第3页
arcglobe二次开发1实习指导书_第4页
arcglobe二次开发1实习指导书_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ArcGlobe二次开发实习指导书实习环软硬实习方使用模板创建ArcGlobe简单应 VisualStudio2008,文件->新建->项目,在项目类型中,选择VisualC#语言,在ArcGIS中选择ExtendingArcObjects,然后在VisualStudio已按照的模板中,选择GlobeControlApplication,可选填自定义名称,如下图中的GlobeTest1,点击确定,就不写(1)类库的privateprivateIGlobeControlm_globeControl=privateIGlobeViewUtilm_globeViewUtil=privateprivatevoidMainForm_Load(objectsender,EventArgs{m_globeControl=axGlobeControl1.ObjectasIGlobeControl;m_globeViewUtil=m_globeControl.GlobeCameraasIGlobeViewUtil;}privatevoidaxGlobeControl1_OnMouseMove(objectsender,IGlobeControlEvents_OnMouseMoveEventprivatevoidaxGlobeControl1_OnMouseMove(objectsender,IGlobeControlEvents_OnMouseMoveEvent{doubledLon,dLat,//convertthewindowcoordinateintogeographiccoordinates ex,outdLon,outdLat,outdAlt);//reportthemousegeographiccoordinateontothestatusbarstatusBarXY.Text=string.Format("{0}{1}{2}",dLon.ToString("###.###"),}自定义创建ArcGlobe简单 VisualStudio2008,文件->新建->项目,在项目类型中,选择Visual点开工具箱->菜单和-> 4)一个简答的Globe应用程序中必须包括一个GlobeControl和一个licenseControl,另外箱->ArcGISWindowsForms->ToolbarControl,将控件拖进form1窗体菜单栏下面,在其属性中设置dock为top。为了能使用控件内置令工具,我们可以向ToolbarControl中添 Add,打开ControlsCommand窗口,在左边1.3ToolbarControl点开工具箱->容器SplitContainer,拖进form1窗体中部,在其属性中设置dock为 1.2TOCControlbuddy 于此,几个基本控件的属性设置基本完毕,但若进行调试将会遇到“ArcGISversionnotspecified”错误,这是因为使用AE10.0开发的独立程序中需要在初始化任何ArcObject适的RunTime。在解决方案中的program.cs(初始化程序的文件)的Application.Run(newForm1());之前写入下面代码即可。程序中定制三维控件privatevoid定制{Item_Click(objectsender,EventArgs axToolbarControl1.Customizeprivatevoid定制{Item_Click(objectsender,EventArgs axToolbarControl1.Customize=ICustomizeDialogm_pCustomizeDialog=newCustomizeDialogClass();m_pCustomizeDialog.StartDialog(m_globeControlhWnd);}菜单管理中添加三维控件方 mand(Findsfeaturesonaglobe,launchesamodeless mand(Findsfeaturesonaglobe,launchesamodelesstosearchfieldsinglobeControlsGlobeFixedLineOfSightTool Rotatestheobserveraroundthe mand Zoomsinwithafixed mand Zoomsoutwithafixed mand(Revealslayersbelowtheselectedlayerintheglobebyflickeringforthespecifiedtimeduration.ControlsGlobeFlyTool Fliesoverthe mand Zoomstofullextentofthe mand PanstheglobetoaspecifiedControlsGlobeHyperlinkTool Hyperlinkstofeaturesonaglobe,ifmorethanonehyperlinkisunderthecursoradialogisshownallowingtheusertoselectwhichhyperlinktojumpControlsGlobeIdentifyTool Findsfeaturesonaglobe,launchesamodelessdialogtosearchfieldsinglobelayers. mand(AddKMLNetworkControlsGlobeLayerListToolControl(ToolcontrolthatdisysalayerlistfortheControlsGlobeLookAroundTool(RotatestheobservertolookControlsGlobeMeasureTool(Measuresfeaturesonaglobe,afloatingtooltipisusedtoshowtheresult.Themessagepropertyreturnsastringforthestatusbar.ControlsGlobeNavigateTool(Navigatesthe mand Togglesglobeandsurfacenavigation mand Orientatestheobservertolook mand(OpensaglobeControlsGlobeOrbitalFlyTool(FliesinorbitaltrajectoriesovertheControlsGlobePanDragTool(TrackballstylepanControlsGlobePanTool(Pansthe mand(Rotatesglobe mand Rotateglobeinaclockwise Rotateglobeinacounterclockwise mand(RotatesglobeControlsGlobeSelectFeaturesTool Selectsfeaturesby mand(Spinsglobeinaclockwise SpinsglobeinacounterClockwise mand Spinsglobe mand(Spinsglobe mand(StopsglobefromControlsGlobeSwipeTool ctivelyrevealslayersonaControlsGlobeTargetCenterTool CentersviewatselectedControlsGlobeTargetPanTool(PanstoselectedControlsGlobeTargetZoomTool(ZoomstoselectedControlsGlobeWalkTool(WalksontheglobeControlsGlobeZoomInOutTool(Dynamicallyzoomsinorouttheprivatevoid平移{Item_Click(objectsender,EventArgsprivatevoid平移{Item_Click(objectsender,EventArgsmandpGlobePannewControlsGlobePanTool();//定义平移空间接=(}自定义控件方法及应 学习如何在系统菜单栏命令控制场景输出功能的开发模式。择BaseCommand模板,并命名为ExportActiceView.cs,点击确定后,弹出如下界面,选择ArcGlobeorGlobeControlCommand,则在解决方案资源管理器中出现publicpublic{//TODO:Definevaluesforthepublicbasem_category="";//localizablebasem_caption="输出活动视 ";//localizablebasem_message="ThisshouldworkinArcGlobeorGlobeControl";//localizabletextbasem_toolTip="";//localizabletextbasem_name= //uniqueid,non-localizable(e.g. yst3D。在解决方案中,右键单击工程,选择“添加”,在弹出来的如下界面中进行选择 using置输出格式、品质以及输出功能的相关代码。如下所示。publicpublicoverridevoid{TODOAddExportActiceView.OnClickimplementation FilePath=newSaveFileDialog();FilePath.Filter="JPG格式(*.jpg)|*.jpg";="FilePath.RestoreDirectory=truei

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论