Skip to content

Commit

Permalink
Set composer grid intervals x/y from WMS getPrint request
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15112 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 1, 2011
1 parent 3836e48 commit 9449548
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/mapserver/qgsconfigparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9449548

Please sign in to comment.