Skip to content

Commit

Permalink
Add a scale parameter for maps in the getPrint request
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15089 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 27, 2011
1 parent 3f8e6a9 commit 9e12afe
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/mapserver/qgsconfigparser.cpp
Expand Up @@ -343,15 +343,26 @@ QgsComposition* QgsConfigParser::createPrintComposition( const QString& composer
}
}

//get layer list from string
//get forced scale from string
if ( replacementList.size() > 2 )
{
bool conversionOk;
double scale = replacementList.at( 2 ).toDouble( &conversionOk );
if ( conversionOk )
{
currentMap->setNewScale( scale );
}
}

//get layer list from string
if ( replacementList.size() > 3 )
{
QStringList layerSet;
QStringList wmsLayerList = replacementList.at( 2 ).split( "," );
QStringList wmsLayerList = replacementList.at( 3 ).split( "," );
QStringList wmsStyleList;
if ( replacementList.size() > 3 )
if ( replacementList.size() > 4 )
{
wmsStyleList = replacementList.at( 3 ).split( "," );
wmsStyleList = replacementList.at( 4 ).split( "," );
}

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

0 comments on commit 9e12afe

Please sign in to comment.