加载TMS文件
TMSOptions imagery;
imagery.url() = "http://readymap.org/readymap/tiles/1.0.0/22/";
m_pMap->addLayer(new ImageLayer("ReadyMap Imagery", imagery));
加载TIF、IMG等格式文件
GDALOptions gdal;
gdal.url() = pDataSource.strFile;
osg::ref_ptr<ImageLayer> pImageLayer = new ImageLayer(pDataSource.strName, gdal);
m_pMap->addLayer(pImageLayer);
加载XYZ格式文件
osgEarth::Drivers::XYZOptions tileOptions;
tileOptions.url() = "http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png";
tileOptions.profile()->namedProfile()=("spherical-mercator");
osgEarth::ImageLayerOptions options = ImageLayerOptions("debug", tileOptions);
osg::ref_ptr<osgEarth::ImageLayer> layer = new ImageLayer(options);
mapNode->getMap()->addImageLayer(layer);
加载MB格式文件
MBTilesTileSourceOptions pMBTiles;
pMBTiles.filename() = pDataSo