Skip to content

Commit 2a1b3a2

Browse files
committedJul 5, 2011
Use world.tif from QGIS package
1 parent aab17ff commit 2a1b3a2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed
 

‎src/plugins/globe/globe_plugin.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,20 @@ void GlobePlugin::run()
120120

121121
// read base layers from earth file
122122
EarthFile earthFile;
123-
if ( !earthFile.readXML( QString("%1/%2").arg(QgsApplication::pkgDataPath()).arg("globe/globe.earth").toStdString() ) )
123+
if ( !earthFile.readXML( QDir::cleanPath( QgsApplication::pkgDataPath() + "/globe/globe.earth" ).toStdString() ) )
124124
{
125125
return;
126126
}
127127

128-
// Add QGIS layer to the map.
129128
osg::ref_ptr<Map> map = earthFile.getMap();
129+
130+
// Add base image to the map
131+
GDALOptions* opt = new GDALOptions();
132+
opt->url() = QDir::cleanPath( QgsApplication::pkgDataPath() + "/globe/world.tif" ).toStdString();
133+
osg::ref_ptr<MapLayer> layer = new ImageMapLayer( "World", opt );
134+
map->addMapLayer( layer );
135+
136+
// Add QGIS layer to the map
130137
mTileSource = new QgsOsgEarthTileSource(mQGisIface);
131138
mTileSource->initialize("", 0);
132139
mQgisMapLayer = new ImageMapLayer( "QGIS", mTileSource );

0 commit comments

Comments
 (0)
Please sign in to comment.