New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WMS GetLegendGrapics: obtain legend graphics with no labels #1377
Conversation
With this commit, you can call GetLegendGraphics with two parameters (LAYERTITLE=false / RULELABEL=false) to disable labels in the resulting legend. Useful for Qgis Web Client, LizMap-Web-Client and Qgis2Leaf.
Added two private variables mDrawLegendLayerLabel and mDrawLegendItemLabel
WMS GetLegendGrapics: obtain legend graphics with no labels
Merged into master branch. Thank you, Luca! |
@mhugent LAYERTITLE doesn't seem to work |
@rldhont I'll see your problem next week. Meanwhile please explain it |
Hi @luca76 here are exemples : qgis_mapserv.fcgi?map=/path/to/lizmap/lizmap/install/qgis/montpellier.qgs&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphics&LAYERS=edition_line&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&TRANSPARENT=TRUE&WIDTH=150 qgis_mapserv.fcgi?map=/path/to/lizmap/lizmap/install/qgis/montpellier.qgs&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphics&LAYERS=edition_line&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&TRANSPARENT=TRUE&WIDTH=150&LAYERTITLE=FALSE qgis_mapserv.fcgi?map=/path/to/lizmap/lizmap/install/qgis/montpellier.qgs&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphics&LAYERS=edition_line&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&TRANSPARENT=TRUE&WIDTH=150&LAYERTITLE=TRUE I have thought that if LAYERTITLE = FALSE, layers title have not be drawn. |
@rldhont My fault. I've pushed a patch to QGIS, and inverted the value of LAYERTITLE. |
Is it ok in 47cf096 ? |
see my comment: It should be on RULEITEM, too :-) |
As requested by @mhungent here is the fixed source code.