Skip to content
Permalink
Browse files

server: accept empty bbox as valid (followup 57046c5, fixes #12440)

  • Loading branch information
jef-n committed Mar 24, 2015
1 parent 7469d2b commit 6309dbd15bfcda20eb4f765f5771ce8d842836bb
Showing with 3 additions and 7 deletions.
  1. +3 −7 src/server/qgswmsserver.cpp
@@ -613,12 +613,8 @@ static QgsRectangle _parseBBOX( const QString &bboxStr, bool &ok )
return QgsRectangle();
}

QgsRectangle bbox( d[0], d[1], d[2], d[3] );
if ( bbox.isEmpty() )
return QgsRectangle();

ok = true;
return bbox;
return QgsRectangle( d[0], d[1], d[2], d[3] );
}


@@ -646,7 +642,7 @@ QImage* QgsWMSServer::getLegendGraphics()

bool bboxOk;
contentBasedLegendExtent = _parseBBOX( mParameters["BBOX"], bboxOk );
if ( !bboxOk )
if ( !bboxOk || contentBasedLegendExtent.isEmpty() )
throw QgsMapServiceException( "InvalidParameterValue", "Invalid BBOX parameter" );

if ( mParameters.contains( "RULE" ) )
@@ -1772,7 +1768,7 @@ int QgsWMSServer::configureMapRender( const QPaintDevice* paintDevice ) const
mMapRenderer->setOutputSize( QSize( paintDevice->width(), paintDevice->height() ), paintDevice->logicalDpiX() );

//map extent
bool bboxOk = true;
bool bboxOk;
QgsRectangle mapExtent = _parseBBOX( mParameters.value( "BBOX", "0,0,0,0" ), bboxOk );
if ( !bboxOk )
{

0 comments on commit 6309dbd

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