Skip to content
Permalink
Browse files
More coherent version string handling in qgis server
  • Loading branch information
mhugent committed Mar 18, 2013
1 parent f50e475 commit 5d62af343a08d1c8ff17c995c8d8af1d6af36e12
Showing with 10 additions and 10 deletions.
  1. +9 −9 src/mapserver/qgsprojectparser.cpp
  2. +1 −1 src/mapserver/qgswmsserver.cpp
@@ -574,7 +574,14 @@ void QgsProjectParser::addLayers( QDomDocument &doc,
QString minScaleString = QString::number( currentLayer->minimumScale() );
QString maxScaleString = QString::number( currentLayer->maximumScale() );

if ( version == "1.3.0" )
if ( version == "1.1.1" )
{
QDomElement scaleHintElem = doc.createElement( "ScaleHint" );
scaleHintElem.setAttribute( "min", minScaleString );
scaleHintElem.setAttribute( "max", maxScaleString );
layerElem.appendChild( scaleHintElem );
}
else
{
QDomElement minScaleElem = doc.createElement( "MinScaleDenominator" );
QDomText minScaleText = doc.createTextNode( minScaleString );
@@ -585,13 +592,6 @@ void QgsProjectParser::addLayers( QDomDocument &doc,
maxScaleElem.appendChild( maxScaleText );
layerElem.appendChild( maxScaleElem );
}
else if ( version == "1.1.1" )
{
QDomElement scaleHintElem = doc.createElement( "ScaleHint" );
scaleHintElem.setAttribute( "min", minScaleString );
scaleHintElem.setAttribute( "max", maxScaleString );
layerElem.appendChild( scaleHintElem );
}
}

if ( fullProjectSettings )
@@ -2386,7 +2386,7 @@ QgsRectangle QgsProjectParser::layerBoundingBoxInProjectCRS( const QDomElement&

BBox.set( minx, miny, maxx, maxy );

if ( version == "1.3.0" && layerCrs.axisInverted() )
if ( version != "1.1.1" && layerCrs.axisInverted() )
{
BBox.invert();
}
@@ -1107,7 +1107,7 @@ int QgsWMSServer::configureMapRender( const QPaintDevice* paintDevice ) const

// Change x- and y- of BBOX for WMS 1.3.0 if axis inverted
QString version = mParameterMap.value( "VERSION", "1.3.0" );
if ( version == "1.3.0" && outputCRS.axisInverted() )
if ( version != "1.1.1" && outputCRS.axisInverted() )
{
//switch coordinates of extent
double tmp;

0 comments on commit 5d62af3

Please sign in to comment.