Skip to content

Commit

Permalink
cache configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pka committed Jul 5, 2011
1 parent 7f8ff41 commit e960c2c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
18 changes: 15 additions & 3 deletions src/plugins/globe/globe.earth
Expand Up @@ -2,18 +2,24 @@

<loading_policy mode="sequential"/>

<!--
<cache type="tilecache">
<path>/home/pi/devel/gis/qgis/.qgis/cache/globe</path>
</cache>
-->

<!--
<image name="world" driver="gdal">
<url>/usr/share/osgearth/data/world.tif</url>
</image>
-->

<!--
<image name="tileservice" driver="tileservice">
<image name="worldwind" driver="tileservice">
<url>http://s0.tileservice.worldwindcentral.com/getTile?</url>
<dataset>bmng.topo.bathy.200401</dataset>
<format>jpg</format>
<max_level>7</max_level>
<max_level>7</max_level>
</image>
-->

Expand All @@ -22,13 +28,19 @@
<url>http://demo.pelicanmapping.com/rmweb/data/srtm30_plus_tms/tms.xml</url>
</heightfield>
-->

<!--
<heightfield name="WorldWind bil" driver="worldwind">
<worldwind_cache>/home/pi/devel/gis/qgis/.qgis/cache/worldwind_srtm</worldwind_cache>
<worldwind_cache>/home/pi/devel/gis/qgis/.qgis/cache/globe/worldwind_srtm</worldwind_cache>
<cache_enabled>false</cache_enabled>
</heightfield>
<vertical_scale>8</vertical_scale>
<skirt_ratio>0.01</skirt_ratio>
-->

<heightfield name="aster_dem" driver="gdal">
<url>/home/pi/data/geodata/Lech/ASTGTM_N47E010/ASTGTM_N47E010_dem.tif</url>
<cache_enabled>false</cache_enabled>
</heightfield>

<!--
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/globe/globe_plugin.cpp
Expand Up @@ -141,7 +141,7 @@ void GlobePlugin::run()

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

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/globe/qgsosgearthtilesource.cpp
Expand Up @@ -30,11 +30,11 @@ using namespace osgEarth;
using namespace osgEarth::Drivers;


QgsOsgEarthTileSource::QgsOsgEarthTileSource( QgisInterface* theQgisInterface ) : TileSource(), mQGisIface(theQgisInterface), mCoordTranform(0)
QgsOsgEarthTileSource::QgsOsgEarthTileSource( QgisInterface* theQgisInterface, const PluginOptions* options ) : TileSource(options), mQGisIface(theQgisInterface), mCoordTranform(0)
{
}

void QgsOsgEarthTileSource::initialize( const std::string& referenceURI, const Profile* overrideProfile)
void QgsOsgEarthTileSource::initialize( const std::string& referenceURI, const Profile* overrideProfile )
{
setProfile( osgEarth::Registry::instance()->getGlobalGeodeticProfile() );
QgsMapRenderer* mainRenderer = mQGisIface->mapCanvas()->mapRenderer();
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/globe/qgsosgearthtilesource.h
Expand Up @@ -17,9 +17,9 @@ namespace osgEarth { namespace Drivers
class QgsOsgEarthTileSource : public TileSource
{
public:
QgsOsgEarthTileSource( QgisInterface* theQgisInterface );
QgsOsgEarthTileSource( QgisInterface* theQgisInterface, const PluginOptions* options = NULL );

void initialize( const std::string& referenceURI, const Profile* overrideProfile);
void initialize( const std::string& referenceURI, const Profile* overrideProfile = NULL );

osg::Image* createImage( const TileKey* key,
ProgressCallback* progress );
Expand Down

0 comments on commit e960c2c

Please sign in to comment.