Bug report #15055
WMS Legend Image is flawed: WMS getLegendGraphic url's get double names/keys
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
Associated revisions
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...
History
#1
Updated by Richard Duivenvoorde about 8 years ago
FYI without patch this is te resulting getLegendGraphic url:
#2
Updated by Richard Duivenvoorde about 8 years ago
- File legendflawed.png added
#3
Updated by Richard Duivenvoorde about 8 years ago
- Status changed from Open to Closed
Fixed in changeset 543d5211332a885960a19b4a7ca7ff3296838a27.
#4
Updated by Jürgen Fischer almost 7 years ago
- Category set to Unknown