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@15089 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 27, 2011
1 parent ecdf400 commit 406ce0d
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/mapserver/qgsconfigparser.cpp
Original file line number Diff line number Diff line change
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 406ce0d

Please sign in to comment.