arcglobe二次開發(fā)1實(shí)習(xí)指導(dǎo)書_第1頁
arcglobe二次開發(fā)1實(shí)習(xí)指導(dǎo)書_第2頁
arcglobe二次開發(fā)1實(shí)習(xí)指導(dǎo)書_第3頁
arcglobe二次開發(fā)1實(shí)習(xí)指導(dǎo)書_第4頁
arcglobe二次開發(fā)1實(shí)習(xí)指導(dǎo)書_第5頁
已閱讀5頁,還剩9頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

ArcGlobe二次開發(fā)實(shí)習(xí)指導(dǎo)書實(shí)習(xí)環(huán)軟硬實(shí)習(xí)方使用模板創(chuàng)建ArcGlobe簡單應(yīng) VisualStudio2008,文件->新建->項(xiàng)目,在項(xiàng)目類型中,選擇VisualC#語言,在ArcGIS中選擇ExtendingArcObjects,然后在VisualStudio已按照的模板中,選擇GlobeControlApplication,可選填自定義名稱,如下圖中的GlobeTest1,點(diǎn)擊確定,就不寫(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("###.###"),}自定義創(chuàng)建ArcGlobe簡單 VisualStudio2008,文件->新建->項(xiàng)目,在項(xiàng)目類型中,選擇Visual點(diǎn)開工具箱->菜單和-> 4)一個(gè)簡答的Globe應(yīng)用程序中必須包括一個(gè)GlobeControl和一個(gè)licenseControl,另外箱->ArcGISWindowsForms->ToolbarControl,將控件拖進(jìn)form1窗體菜單欄下面,在其屬性中設(shè)置dock為top。為了能使用控件內(nèi)置令工具,我們可以向ToolbarControl中添 Add,打開ControlsCommand窗口,在左邊1.3ToolbarControl點(diǎn)開工具箱->容器SplitContainer,拖進(jìn)form1窗體中部,在其屬性中設(shè)置dock為 1.2TOCControlbuddy 于此,幾個(gè)基本控件的屬性設(shè)置基本完畢,但若進(jìn)行調(diào)試將會(huì)遇到“ArcGISversionnotspecified”錯(cuò)誤,這是因?yàn)槭褂肁E10.0開發(fā)的獨(dú)立程序中需要在初始化任何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();//定義平移空間接=(}自定義控件方法及應(yīng) 學(xué)習(xí)如何在系統(tǒng)菜單欄命令控制場(chǎng)景輸出功能的開發(fā)模式。擇BaseCommand模板,并命名為ExportActiceView.cs,點(diǎn)擊確定后,彈出如下界面,選擇ArcGlobeorGlobeControlCommand,則在解決方案資源管理器中出現(xiàn)publicpublic{//TODO:Definevaluesforthepublicbasem_category="";//localizablebasem_caption="輸出活動(dòng)視 ";//localizablebasem_message="ThisshouldworkinArcGlobeorGlobeControl";//localizabletextbasem_toolTip="";//localizabletextbasem_name= //uniqueid,non-localizable(e.g. yst3D。在解決方案中,右鍵單擊工程,選擇“添加”,在彈出來的如下界面中進(jìn)行選擇 using置輸出格式、品質(zhì)以及輸出功能的相關(guān)代碼。如下所示。publicpublicoverridevoid{TODOAddExportActiceView.OnClickimplementation FilePath=newSaveFileDialog();FilePath.Filter="JPG格式(*.jpg)|*.jpg";="FilePath.RestoreDirectory=truei

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論