Skip to content

Commit 2e4c7c9

Browse files
committed
Fix bbox-based GetLegendGraphic for CRS with inverted axes (e.g. EPSG:4326)
1 parent e26e365 commit 2e4c7c9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/providers/wms/qgswmsprovider.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -3004,7 +3004,8 @@ QUrl QgsWmsProvider::getLegendGraphicFullURL( double scale, const QgsRectangle&
30043004

30053005
if ( useContextualWMSLegend )
30063006
{
3007-
setQueryItem( url, "BBOX", toParamValue( visibleExtent ) );
3007+
bool changeXY = mCaps.shouldInvertAxisOrientation( mImageCrs );
3008+
setQueryItem( url, "BBOX", toParamValue( visibleExtent, changeXY ) );
30083009
setSRSQueryItem( url );
30093010
}
30103011

src/providers/wms/qgswmsprovider.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ class QgsWmsProvider : public QgsRasterDataProvider
426426
*
427427
* \note it does not perform any escape
428428
*/
429-
QString toParamValue( const QgsRectangle& rect, bool changeXY = false );
429+
QString toParamValue( const QgsRectangle& rect, bool changeXY );
430430

431431
/* \brief add SRS or CRS parameter */
432432
void setSRSQueryItem( QUrl& url );

0 commit comments

Comments
 (0)