Skip to content
Permalink
Browse files

Set composer grid intervals x/y from WMS getPrint request

git-svn-id: http://svn.osgeo.org/qgis/trunk@15112 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Feb 1, 2011
1 parent 3836e48 commit 9449548839d4341d154c4db02d67215ba07fe477
Showing with 31 additions and 0 deletions.
  1. +31 −0 src/mapserver/qgsconfigparser.cpp
@@ -400,6 +400,37 @@ QgsComposition* QgsConfigParser::createPrintComposition( const QString& composer
currentMap->setLayerSet( layerSet );
currentMap->setKeepLayerSet( true );
}

//grid space x / y
QMap< QString, QString >::const_iterator gridSpaceXIt = parameterMap.find( mapId + ":GRID_INTERVAL_X" );
if ( gridSpaceXIt != parameterMap.constEnd() )
{
bool intervalXOk;
double intervalX = gridSpaceXIt->toDouble( &intervalXOk );
if ( intervalXOk )
{
currentMap->setGridIntervalX( intervalX );
}
}
else
{
currentMap->setGridIntervalX( 0 );
}

QMap< QString, QString >::const_iterator gridSpaceYIt = parameterMap.find( mapId + ":GRID_INTERVAL_Y" );
if ( gridSpaceYIt != parameterMap.constEnd() )
{
bool intervalYOk;
double intervalY = gridSpaceYIt->toDouble( &intervalYOk );
if ( intervalYOk )
{
currentMap->setGridIntervalY( intervalY );
}
}
else
{
currentMap->setGridIntervalY( 0 );
}
}

//replace label text

0 comments on commit 9449548

Please sign in to comment.
You can’t perform that action at this time.