[QGIS Commit] r15089 - trunk/qgis/src/mapserver
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Jan 27 09:18:02 EST 2011
Author: mhugent
Date: 2011-01-27 06:18:02 -0800 (Thu, 27 Jan 2011)
New Revision: 15089
Modified:
trunk/qgis/src/mapserver/qgsconfigparser.cpp
Log:
Add a scale parameter for maps in the getPrint request
Modified: trunk/qgis/src/mapserver/qgsconfigparser.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgsconfigparser.cpp 2011-01-27 13:51:30 UTC (rev 15088)
+++ trunk/qgis/src/mapserver/qgsconfigparser.cpp 2011-01-27 14:18:02 UTC (rev 15089)
@@ -343,15 +343,26 @@
}
}
- //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 )
More information about the QGIS-commit
mailing list