




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
ArcGlobe二次開發(fā)實習指導書實習環(huán)軟硬實習方使用模板創(chuàng)建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("###.###"),}自定義創(chuàng)建ArcGlobe簡單 VisualStudio2008,文件->新建->項目,在項目類型中,選擇Visual點開工具箱->菜單和-> 4)一個簡答的Globe應用程序中必須包括一個GlobeControl和一個licenseControl,另外箱->ArcGISWindowsForms->ToolbarControl,將控件拖進form1窗體菜單欄下面,在其屬性中設置dock為top。為了能使用控件內(nèi)置令工具,我們可以向ToolbarControl中添 Add,打開ControlsCommand窗口,在左邊1.3ToolbarControl點開工具箱->容器SplitContainer,拖進form1窗體中部,在其屬性中設置dock為 1.2TOCControlbuddy 于此,幾個基本控件的屬性設置基本完畢,但若進行調(diào)試將會遇到“ArcGISversionnotspecified”錯誤,這是因為使用AE10.0開發(fā)的獨立程序中需要在初始化任何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();//定義平移空間接=(}自定義控件方法及應 學習如何在系統(tǒng)菜單欄命令控制場景輸出功能的開發(fā)模式。擇BaseCommand模板,并命名為ExportActiceView.cs,點擊確定后,彈出如下界面,選擇ArcGlobeorGlobeControlCommand,則在解決方案資源管理器中出現(xiàn)publicpublic{//TODO:Definevaluesforthepublicbasem_category="";//localizablebasem_caption="輸出活動視 ";//localizablebasem_message="ThisshouldworkinArcGlobeorGlobeControl";//localizabletextbasem_toolTip="";//localizabletextbasem_name= //uniqueid,non-localizable(e.g. yst3D。在解決方案中,右鍵單擊工程,選擇“添加”,在彈出來的如下界面中進行選擇 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等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年張家界市市場監(jiān)督管理局招聘公益性崗位人員考試真題
- 騰訊云雀信息技術(shù)有限公司招聘筆試真題2024
- 礦山電氣設備管理與維護考核試卷
- 2025護理工作計劃
- 眼鏡店空間布局設計與顧客體驗考核試卷
- 生態(tài)保護與綠色生活方式考核試卷
- 轉(zhuǎn)正工作總結(jié)范文(16篇)
- 生態(tài)保護工程生態(tài)保護與生態(tài)工程規(guī)劃方法考核試卷
- 電聲器件在戶外廣告設備中的應用考核試卷
- 學生的自我評語(5篇)
- (2024年)肺栓塞課件
- 2024吉林省民航機場集團有限公司招聘筆試參考題庫附帶答案詳解
- 電磁現(xiàn)象及其應用-理解電磁現(xiàn)象及其在日常生活中的應用
- 車輛行駛安全培訓模板
- 開展中醫(yī)藥健康文化宣傳活動方案(樣式)
- 油漆涂料行業(yè)市場分析
- 呼吸道合胞病毒知識科普
- 跨境數(shù)據(jù)流動與治理
- 輸血治療知情同意書
- 幼兒園副園長聘任園長合同(36篇)
- 30道中國石油天然氣地球物理勘探工程師崗位常見面試問題含HR常問問題考察點及參考回答
評論
0/150
提交評論