Bug report #20693

LAYERTITLESPACE in GetLegendGraphic is not taken into account

Added by Daniele Viganò almost 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:QGIS Server
Affected QGIS version:3.5(master) Regression?:No
Operating System:Fedora 29 Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28513

Description

When generating a legend via 'GetLegendGraphic' QGIS Server is not honoring the 'LAYERTITLESPACE' parameter.

Documentation says:

LAYERTITLESPACE vertical space between layer title and items following (mm)

But nothing changes in the output when value of LAYERTITLESPACE is adjusted.
See attachments for examples of a legend with LAYERTITLESPACE=10 and LAYERTITLESPACE=1

I'm running QGIS Server 3.4.2 on Fedora 29, but I was able to reproduce the issue either with 3.4.1 and Ubuntu.

LAYERTITLESPACE_10.png - Legend with LAYERTITLESPACE=10 (11.7 KB) Daniele Viganò, 2018-12-01 04:57 PM

LAYERTITLESPACE_1.png - Legend with LAYERTITLESPACE=1 (11.7 KB) Daniele Viganò, 2018-12-01 04:57 PM

Associated revisions

Revision d4999400
Added by Alessandro Pasotti almost 6 years ago

[server] Respect layer title space when rendering legends

Fixes #20693 - LAYERTITLESPACE in GetLegendGraphic is not taken into account

History

#1 Updated by Daniele Viganò almost 6 years ago

Requested URL is:

LAYERTITLESPACE=10

/ogc/ghm?SERVICE=WMS&VERSION=1.3.0&SLD_VERSION=1.1.0&REQUEST=GetLegendGraphic&FORMAT=image/png&LAYER=Seismic%20Hazard%20PGA%20%28g%29&TRANSPARENT=false&LAYERFONTSIZE=11&ITEMFONTSIZE=10&SYMBOLSPACE=1&SYMBOLWIDTH=5&SYMBOLHEIGT=5&ICONLABELSPACE=2&LAYERTITLE=true&LAYERTITLESPACE=10&&BOXSPACE=1&DPI=96

LAYERTITLESPACE=1

/ogc/ghm?SERVICE=WMS&VERSION=1.3.0&SLD_VERSION=1.1.0&REQUEST=GetLegendGraphic&FORMAT=image/png&LAYER=Seismic%20Hazard%20PGA%20%28g%29&TRANSPARENT=false&LAYERFONTSIZE=11&ITEMFONTSIZE=10&SYMBOLSPACE=1&SYMBOLWIDTH=5&SYMBOLHEIGT=5&ICONLABELSPACE=2&LAYERTITLE=true&LAYERTITLESPACE=1&BOXSPACE=1&DPI=96

#2 Updated by Alessandro Pasotti almost 6 years ago

I can confirm: there is absolutely nothing in the server code that uses that parameter, if it was working in QGIS 2.x this would be a regression, otherwise a feature request.

#3 Updated by Alessandro Pasotti almost 6 years ago

  • Assignee set to Alessandro Pasotti

#4 Updated by Alessandro Pasotti almost 6 years ago

  • Affected QGIS version changed from 3.4.2 to 3.5(master)
  • Pull Request or Patch supplied changed from No to Yes
  • Status changed from Open to In Progress

#5 Updated by Paul Blottiere almost 6 years ago

By reading the code of QGIS 2.18, it doesn't seem to be a regression because the underlying parameter was not used either.

And thanks for the bugfix @elpaso.

#6 Updated by Alessandro Pasotti almost 6 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

Also available in: Atom PDF