[Marble-commits] KDE/kdeedu/marble/src/lib
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Sun Jan 9 18:50:07 CET 2011
SVN commit 1213223 by beschow:
MapWizard: set projection to "Mercator" in the static URL case
M +5 -4 MapWizard.cpp
--- trunk/KDE/kdeedu/marble/src/lib/MapWizard.cpp #1213222:1213223
@@ -688,26 +688,25 @@
GeoSceneTexture *texture = new GeoSceneTexture( "map" );
texture->setExpire( 31536000 );
texture->setStorageLayout( GeoSceneTexture::Marble );
- texture->setProjection( GeoSceneTexture::Equirectangular );
texture->setSourceDir( "earth/" + document->head()->theme() );
- QUrl downloadUrl;
if( d->mapProviderType == MapWizardPrivate::WmsMap )
{
texture->setFileFormat( d->format );
QString layer = d->uiWidget.comboBoxWmsMap->itemData( d->uiWidget.comboBoxWmsMap->currentIndex() ).toString();
- downloadUrl = QUrl( d->uiWidget.lineEditWmsUrl->text() );
+ QUrl downloadUrl = QUrl( d->uiWidget.lineEditWmsUrl->text() );
downloadUrl.addQueryItem( "layers", layer );
texture->addDownloadUrl( downloadUrl );
texture->setMaximumTileLevel( 20 );
texture->setLevelZeroRows( 1 );
texture->setLevelZeroColumns( 1 );
texture->setStorageLayout( GeoSceneTexture::WebMapService );
+ texture->setProjection( GeoSceneTexture::Equirectangular );
}
else if( d->mapProviderType == MapWizardPrivate::StaticUrlMap )
{
texture->setFileFormat( d->uiWidget.comboBoxStaticUrlFormat->currentText() );
- downloadUrl = QUrl( d->uiWidget.comboBoxStaticUrlServer->currentText() );
+ QUrl downloadUrl = QUrl( d->uiWidget.comboBoxStaticUrlServer->currentText() );
texture->addDownloadPolicy( DownloadBrowse, 20 );
texture->addDownloadPolicy( DownloadBulk, 2 );
texture->addDownloadUrl( downloadUrl );
@@ -715,6 +714,7 @@
texture->setLevelZeroRows( 1 );
texture->setLevelZeroColumns( 1 );
texture->setStorageLayout( GeoSceneTexture::Custom );
+ texture->setProjection( GeoSceneTexture::Mercator );
}
else if( d->mapProviderType == MapWizardPrivate::StaticImageMap )
@@ -723,6 +723,7 @@
d->format = image.right( image.length() - image.lastIndexOf( '.' ) - 1 ).toLower();
texture->setFileFormat( d->format.toUpper() );
texture->setInstallMap( document->head()->theme() + "." + d->format );
+ texture->setProjection( GeoSceneTexture::Equirectangular );
int imageWidth = QImage( image ).width();
int tileSize = 675;
More information about the Marble-commits
mailing list