File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -120,13 +120,20 @@ void GlobePlugin::run()
120
120
121
121
// read base layers from earth file
122
122
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 () ) )
124
124
{
125
125
return ;
126
126
}
127
127
128
- // Add QGIS layer to the map.
129
128
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
130
137
mTileSource = new QgsOsgEarthTileSource (mQGisIface );
131
138
mTileSource ->initialize (" " , 0 );
132
139
mQgisMapLayer = new ImageMapLayer ( " QGIS" , mTileSource );
You can’t perform that action at this time.
0 commit comments