Skip to content

Commit

Permalink
Fix bbox-based GetLegendGraphic for CRS with inverted axes (e.g. EPSG…
Browse files Browse the repository at this point in the history
…:4326)
  • Loading branch information
wonder-sk committed Jan 14, 2015
1 parent e26e365 commit 2e4c7c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -3004,7 +3004,8 @@ QUrl QgsWmsProvider::getLegendGraphicFullURL( double scale, const QgsRectangle&

if ( useContextualWMSLegend )
{
setQueryItem( url, "BBOX", toParamValue( visibleExtent ) );
bool changeXY = mCaps.shouldInvertAxisOrientation( mImageCrs );
setQueryItem( url, "BBOX", toParamValue( visibleExtent, changeXY ) );
setSRSQueryItem( url );
}

Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmsprovider.h
Expand Up @@ -426,7 +426,7 @@ class QgsWmsProvider : public QgsRasterDataProvider
*
* \note it does not perform any escape
*/
QString toParamValue( const QgsRectangle& rect, bool changeXY = false );
QString toParamValue( const QgsRectangle& rect, bool changeXY );

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

0 comments on commit 2e4c7c9

Please sign in to comment.