資源描述:
《osgearth如何加載離線谷歌衛(wèi)星地圖瓦片的源碼教程》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、osgEarth如何加載離線谷歌衛(wèi)星地圖瓦片的源碼教程說明本實(shí)例演示重新編譯bing驅(qū)動(dòng)直接加載本地離線影像瓦片地圖。本實(shí)例使用軟件版本:osg3.3.1和osgEarth2.5VC10編譯環(huán)境(參考o(jì)sgearth加載谷歌衛(wèi)星地圖的源碼案例),vs2010,水經(jīng)注萬能地圖下載器。影像瓦片來源“水經(jīng)注萬能地圖下載器”。如果沒有安裝本軟件,可以百度“水經(jīng)注軟件”到官方網(wǎng)站下載。一、下載瓦片數(shù)據(jù)啟動(dòng)水經(jīng)注萬能地圖下載器,點(diǎn)擊“我的下載”,選擇“新建任務(wù)”,彈出“選擇地圖類型”對話框,選擇相應(yīng)的地圖類型,點(diǎn)擊“確認(rèn)”,如下圖。isthe
2、TibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.Xiningislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agriculturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture彈出“新建任務(wù)”對話框輸入全球坐標(biāo),由于我
3、們需要導(dǎo)出瓦片數(shù)據(jù),為了增加縮放效果,這里我們從1級(jí)到8級(jí)都勾選上。選擇好級(jí)別后,點(diǎn)擊開始下載。下載完成后會(huì)彈出對話框詢問是否要立即導(dǎo)出,選擇“是”,然后顯示“導(dǎo)出圖片數(shù)據(jù)”對話框,如下圖所示。istheTibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.Xiningislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agric
4、ulturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture在該對話框中,選擇導(dǎo)出“瓦片:BingMap”,導(dǎo)出級(jí)別“1-8”,選擇保存路徑,點(diǎn)擊“輸出”按鈕導(dǎo)出數(shù)據(jù)即可。二、重新編譯Bing驅(qū)動(dòng)新建“osgdb_osgearth_bingd”動(dòng)態(tài)庫項(xiàng)目,如下圖所示。istheTibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.Xiningislocatedin
5、the"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agriculturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture點(diǎn)擊“確定”,彈出“應(yīng)用程序向?qū)А?,如下圖所示。點(diǎn)擊下一步istheTibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.Xini
6、ngislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agriculturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture選擇程序類型“DLL”,點(diǎn)擊“完成”。istheTibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.X
7、iningislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agriculturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture添加“包含目錄”和“庫目錄”包含目錄設(shè)置為“D:OSGinclude”庫目錄設(shè)置為“D:OSGlib“以上目錄路徑根據(jù)OSG文件位置設(shè)定。istheTibet
8、anPlateaupoly.Centercityonlyapopulationofoveronemillion.Xiningislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheL