资源描述:
《osgearth如何加载离线谷歌卫星地图瓦片的源码教程》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、osgEarth如何加载离线谷歌卫星地图瓦片的源码教程说明本实例演示重新编译bing驱动直接加载本地离线影像瓦片地图。本实例使用软件版本:osg3.3.1和osgEarth2.5VC10编译环境(参考osgearth加载谷歌卫星地图的源码案例),vs2010,水经注万能地图下载器。影像瓦片来源“水经注万能地图下载器”。如果没有安装本软件,可以百度“水经注软件”到官方网站下载。一、下载瓦片数据启动水经注万能地图下载器,点击“我的下载”,选择“新建任务”,弹出“选择地图类型”对话框,选择相应的地图类型,点击“确认”,如下图。isthe
2、TibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.Xiningislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agriculturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture弹出“新建任务”对话框输入全球坐标,由于我
3、们需要导出瓦片数据,为了增加缩放效果,这里我们从1级到8级都勾选上。选择好级别后,点击开始下载。下载完成后会弹出对话框询问是否要立即导出,选择“是”,然后显示“导出图片数据”对话框,如下图所示。istheTibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.Xiningislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agric
4、ulturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture在该对话框中,选择导出“瓦片:BingMap”,导出级别“1-8”,选择保存路径,点击“输出”按钮导出数据即可。二、重新编译Bing驱动新建“osgdb_osgearth_bingd”动态库项目,如下图所示。istheTibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.Xiningislocatedin
5、the"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agriculturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture点击“确定”,弹出“应用程序向导”,如下图所示。点击下一步istheTibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.Xini
6、ngislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agriculturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture选择程序类型“DLL”,点击“完成”。istheTibetanPlateaupoly.Centercityonlyapopulationofoveronemillion.X
7、iningislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheLoessPlateauandtheTibetanPlateau,agriculturalandpastoralareasand,inconjunctionwiththeMinistryofcultureandIslamicculture添加“包含目录”和“库目录”包含目录设置为“D:OSGinclude”库目录设置为“D:OSGlib“以上目录路径根据OSG文件位置设定。istheTibet
8、anPlateaupoly.Centercityonlyapopulationofoveronemillion.Xiningislocatedinthe"Tangfangudao"andtheancient"SilkRoad"road,istheL