Skip to content

Commit 406ce0d

Browse files
author
mhugent
committed
Add a scale parameter for maps in the getPrint request
git-svn-id: http://svn.osgeo.org/qgis/trunk@15089 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent ecdf400 commit 406ce0d

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/mapserver/qgsconfigparser.cpp

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,26 @@ QgsComposition* QgsConfigParser::createPrintComposition( const QString& composer
343343
}
344344
}
345345

346-
//get layer list from string
346+
//get forced scale from string
347347
if ( replacementList.size() > 2 )
348+
{
349+
bool conversionOk;
350+
double scale = replacementList.at( 2 ).toDouble( &conversionOk );
351+
if ( conversionOk )
352+
{
353+
currentMap->setNewScale( scale );
354+
}
355+
}
356+
357+
//get layer list from string
358+
if ( replacementList.size() > 3 )
348359
{
349360
QStringList layerSet;
350-
QStringList wmsLayerList = replacementList.at( 2 ).split( "," );
361+
QStringList wmsLayerList = replacementList.at( 3 ).split( "," );
351362
QStringList wmsStyleList;
352-
if ( replacementList.size() > 3 )
363+
if ( replacementList.size() > 4 )
353364
{
354-
wmsStyleList = replacementList.at( 3 ).split( "," );
365+
wmsStyleList = replacementList.at( 4 ).split( "," );
355366
}
356367

357368
for ( int i = 0; i < wmsLayerList.size(); ++i )

0 commit comments

Comments
 (0)