Skip to content

Commit

Permalink
Use world.tif from QGIS package
Browse files Browse the repository at this point in the history
  • Loading branch information
pka committed Jul 5, 2011
1 parent aab17ff commit 2a1b3a2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/plugins/globe/globe_plugin.cpp
Expand Up @@ -120,13 +120,20 @@ void GlobePlugin::run()

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

// Add QGIS layer to the map.
osg::ref_ptr<Map> map = earthFile.getMap();

// Add base image to the map
GDALOptions* opt = new GDALOptions();
opt->url() = QDir::cleanPath( QgsApplication::pkgDataPath() + "/globe/world.tif" ).toStdString();
osg::ref_ptr<MapLayer> layer = new ImageMapLayer( "World", opt );
map->addMapLayer( layer );

// Add QGIS layer to the map
mTileSource = new QgsOsgEarthTileSource(mQGisIface);
mTileSource->initialize("", 0);
mQgisMapLayer = new ImageMapLayer( "QGIS", mTileSource );
Expand Down

0 comments on commit 2a1b3a2

Please sign in to comment.