Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More coherent version string handling in qgis server
  • Loading branch information
mhugent committed Mar 18, 2013
1 parent f50e475 commit 5d62af3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/mapserver/qgsprojectparser.cpp
Expand Up @@ -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 );
Expand All @@ -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 )
Expand Down Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/mapserver/qgswmsserver.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 5d62af3

Please sign in to comment.