Bug report #11406

Qgis-server in single-symbol and category renderer don't use the metadata title

Added by aperi2007 - about 10 years ago. Updated about 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:QGIS Server
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 #:19686

Description

In qgis-server (I tested with last dev), when using a categorized renderer and GetLegendGraphics, the returned image doesn't show the LayerName as title of the layer in the legend. Like in this sample:

Or this other for single-symbol rendering:

AFAICT it would be better to use the the metadata title (when filled) in the legend. In fact the layername is often a non-understandable code while the metadata title is a human understandable value.

I asked on ML, whether this is a regression and was asked to opened a ticket.

Thx.

See also Qgis-server in single-symbol renderer don't use the metadata title.

qgis24_1.gif - result on a qgis 2.4 server (29.2 KB) aperi2007 -, 2014-10-14 01:43 AM

qgis24_2.gif - another image from qgis 2.4 server (3.62 KB) aperi2007 -, 2014-10-14 01:43 AM

qgis26_1.gif - The response using a QGIS 2.6 server (35.2 KB) aperi2007 -, 2014-10-14 02:15 AM

qgis26_2.gif - Also this is a response from the QGIS 2.6 server (7.42 KB) aperi2007 -, 2014-10-14 02:15 AM

Associated revisions

Revision bb95a0f4
Added by Jürgen Fischer about 10 years ago

use layer title instead of name in server getlegendgraphic response (fixes #11406)

History

#1 Updated by Giovanni Manghi about 10 years ago

  • Status changed from Open to Feedback
  • Affected QGIS version changed from 2.4.0 to master

is this a regression compared to previous qgis server releases? cheers!

#2 Updated by aperi2007 - about 10 years ago

I try to test is directly.

But is not so easy.
I dont know how to maintain two completelly distinct versions of qgis-server on the same machine.

So the only solution is remove the dev and compile the 2.4
This require some time to do.
I hope to do this early.

A.

#3 Updated by aperi2007 - about 10 years ago

Hi,
I confirm is a regression.
I tested it on qgis 2.4 e correctly appear the ttles.
I attach two images to show the results from the same getlegendgraphics .

#4 Updated by aperi2007 - about 10 years ago

also this image from qgis 2.4 server.

#5 Updated by Giovanni Manghi about 10 years ago

  • Status changed from Feedback to Open

#6 Updated by aperi2007 - about 10 years ago

I add also the two images for the same requests on the same datasets and same project qgis using a qgis 26 server.

The second image show clearly that in the title of layer , qgis 2.6 server , is using the layer_name :

"elementi_franosi_single_renderer"
instead of the title ad available from Metatada->Title ("Title of layer")

Same proble when using the Categorize rendering.

I dont test for rule-rendering but I guess more probably the problem is also in it.

A.

#7 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF