Bug report #17888

missing symbol names in WMS legend (QGIS server)

Added by Anne Blankert over 6 years ago. Updated over 5 years ago.

Status:Closed
Priority:High
Assignee:-
Category:QGIS Server
Affected QGIS version:2.14.18 Regression?:Yes
Operating System:Ubuntu 17.10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:no timely feedback
Crashes QGIS or corrupts data:No Copied to github as #:25783

Description

After upgrading to Ubuntu 17.10 and installing the default QGis server from the repository, the WMS getLegendGraphics request parameter LAYERTITLE now produces wrong / different result.

There are 2 kinds of layers:
1. layers with multiple symbols (classes)
2. layers with a single symbol

Old (expected) behavior of the LAYERTITLE option in the WMS getLegendGraphics request:
layertitle=false => show only symbol names. If the layer has only one symbol, show the symbol name (by default identical to layer title)
layertitle=true => for layers with more than one symbol, show the layer title at the top of the list of symbols

New (unexpected) behavior:
layertitle=false => (see attached image legendlayertitlefalse.png): no names for single symbol layers, symbol names for multi-symbol layers
layertitle=true => (see attached image legendlayertitletrue.png): duplicate names for single symbol layers (layer-title + layer-title for single symbol), for multi-symbol layer: layer-title + symbol names for each symbol

Example WMS getLegendGraphics URLs:
laytertitle=false:
https://pico.geodan.nl/cgi-bin/qgis_mapserv.fcgi?DPI=120&map=/usr/lib/cgi-bin/projects/Infra_elektra_fout.qgs&request=GetLegendGraphic&service=WMS&itemFONTSIZE=8&format=png&layertitle=false&layer=Infra_elektra_fout

layertitle=true:
https://pico.geodan.nl/cgi-bin/qgis_mapserv.fcgi?DPI=120&map=/usr/lib/cgi-bin/projects/Infra_elektra_fout.qgs&request=GetLegendGraphic&service=WMS&itemFONTSIZE=8&format=png&layertitle=true&layer=Infra_elektra_fout

legendlayertitlefalse.png - legend output with option &layertitle=false (10.1 KB) Anne Blankert, 2018-01-18 04:24 PM

legendlayertitletrue.png - legend output with option &layertitle=true (95.2 KB) Anne Blankert, 2018-01-18 04:24 PM

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Priority changed from Normal to High

#2 Updated by Regis Haubourg over 5 years ago

  • Status changed from Open to Feedback

is it still true in 2.18 and QGIS 3 ?

#3 Updated by Jürgen Fischer over 5 years ago

  • Resolution set to no timely feedback
  • Status changed from Feedback to Closed

Also available in: Atom PDF