[QGIS-Developer] Behaviour of GetLegendGraphics in case a custom static legend is provided

Andreas Neumann a.neumann at carto.net
Fri Apr 5 00:15:54 PDT 2019


Hi, 

In QGIS there is the option in the "Layer Properties" --> "QGIS Server"
--> "LegendUrl" to provide a custom legend. 

We noticed that, while QGIS Desktop as a client loads and displays this
alternative legend, if a single WMS leaf layer is requested, that the
custom legend is not delivered when doing a GetFeatureInfo request on
that specific layer. It is also not used when asking for a
GetLegendGraphics of a whole group or the whole project. 

I'd like to discuss if this is the intended behavior or not? 

While I understand that it would be much more complicated to integrate
this custom legend into a generated legend (the generated legend would
have to split into peices and then merged with the custom legend), I
think this is what the users would expect. They spend a lot of efforts
on a nice custom legend (matching the rest of the automatically
generated legend) and then GetLegendGraphics respond isn't even using
this legend? At least my users are disappointed. 

-------- 

Alternatively, I think, if we improve the GetLegendGraphics in the
future, there might hardly any need for custom legends. But in the
current state ... 

What we miss in the GetLegendGraphics is mainly the following: 

- get a proper legend for text labels (currently, nothing is displayed,
just the layer name) 

- in addition / or alternatively, it would be nice if a legend for a
given layer could be suppressed. In many cases a legend for a certain
layer is quite useless. A layer may even be rendered with a "no symbol"
renderer to allow querying invisible features. 

Thanks for a discussion on this topic. 

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190405/47660b62/attachment.html>


More information about the QGIS-Developer mailing list