Bug report #15055

WMS Legend Image is flawed: WMS getLegendGraphic url's get double names/keys

Added by Richard Duivenvoorde over 8 years ago. Updated about 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Unknown
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22998

Description

IF a WMS service provides GetLegendGraphic url's in it's capabilities, QGIS tries to retrieve the legendimage and shows it in the layermanager.

Some services provide full url's, others only parts, that is why in current implementation there is a check IF certain query-names are available in the url-query and else are added:
https://github.com/qgis/QGIS/blob/master/src/providers/wms/qgswmsprovider.cpp#L2993

BUT certain services provide the url in lowercase key/value pairs, resulting in double key/value pairs in the url, resulting in error messages instead of images.

To test: add a layer from this service:
http://geoservices.knmi.nl/cgi-bin/RADNL_OPER_R___25PCPRR_L3.cgi?

I have already created a patch for it, and will do a pull request

legendflawed.png - Legend Flawed message in layermanager (24.5 KB) Richard Duivenvoorde, 2016-06-17 06:46 AM

Associated revisions

Revision 543d5211
Added by Richard Duivenvoorde over 8 years ago

WMS GetLegendGraphic fix #15055 (#3213)

When creating the legend image url, this tests for available queryparams
in a case-insensitive way...

Revision 9bdfa67d
Added by Richard Duivenvoorde over 8 years ago

WMS GetLegendGraphic fix #15055

See http://hub.qgis.org/issues/15055

When creating the legend image url, this tests for available queryparams
in a case-insensitive way...

Also available in: Atom PDF