mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
WMS 1.3.0 compliance: throw exception if bbox is empty
This commit is contained in:
parent
6e8e7369d2
commit
1fd290f243
@ -694,6 +694,10 @@ static QgsRectangle _parseBBOX( const QString &bboxStr, bool &ok )
|
||||
}
|
||||
|
||||
ok = true;
|
||||
if ( d[2] <= d[0] || d[3] <= d[1] )
|
||||
{
|
||||
throw QgsMapServiceException( "InvalidParameterValue", "BBOX is empty" );
|
||||
}
|
||||
return QgsRectangle( d[0], d[1], d[2], d[3] );
|
||||
}
|
||||
|
||||
@ -2044,6 +2048,11 @@ int QgsWmsServer::configureMapRender( const QPaintDevice* paintDevice ) const
|
||||
throw QgsMapServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Invalid BBOX parameter" ) );
|
||||
}
|
||||
|
||||
if ( mapExtent.isEmpty() )
|
||||
{
|
||||
throw QgsMapServiceException( "InvalidParameterValue", "BBOX is empty" );
|
||||
}
|
||||
|
||||
QgsUnitTypes::DistanceUnit mapUnits = QgsUnitTypes::DistanceDegrees;
|
||||
|
||||
QString crs = mParameters.value( QStringLiteral( "CRS" ), mParameters.value( QStringLiteral( "SRS" ) ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user