Skip to content

Commit

Permalink
WMS server: parse bounding box only if the BBOX parameter is really t…
Browse files Browse the repository at this point in the history
…here
  • Loading branch information
mhugent authored and rldhont committed Dec 12, 2016
1 parent dd688a5 commit 3855115
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/server/qgswmsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2080,8 +2080,13 @@ int QgsWMSServer::configureMapRender( const QPaintDevice* paintDevice ) const
mMapRenderer->setOutputSize( QSize( paintDevice->width(), paintDevice->height() ), paintDevice->logicalDpiX() );

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

if ( !bboxOk )
{
//throw a service exception
Expand Down

0 comments on commit 3855115

Please sign in to comment.