Skip to content
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

Merged
merged 2 commits into from May 21, 2014
Merged

WMS GetLegendGrapics: obtain legend graphics with no labels #1377

merged 2 commits into from May 21, 2014

Conversation

luca76
Copy link
Contributor

@luca76 luca76 commented May 21, 2014

As requested by @mhungent here is the fixed source code.

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
mhugent added a commit that referenced this pull request May 21, 2014
WMS GetLegendGrapics: obtain legend graphics with no labels
@mhugent mhugent merged commit 5417639 into qgis:master May 21, 2014
@mhugent
Copy link
Contributor

mhugent commented May 21, 2014

Merged into master branch. Thank you, Luca!

@rldhont
Copy link
Contributor

rldhont commented Jun 13, 2014

@mhugent LAYERTITLE doesn't seem to work

@luca76
Copy link
Contributor Author

luca76 commented Jun 14, 2014

@rldhont I'll see your problem next week. Meanwhile please explain it

@rldhont
Copy link
Contributor

rldhont commented Jun 14, 2014

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_server_getlegendgraphics_without_layertitle

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_server_getlegendgraphics_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
qgis_server_getlegendgraphics_layertitle_true

I have thought that if LAYERTITLE = FALSE, layers title have not be drawn.
@mhugent what do you think about this ?

@luca76
Copy link
Contributor Author

luca76 commented Jun 16, 2014

@rldhont My fault. I've pushed a patch to QGIS, and inverted the value of LAYERTITLE.
Now I'll fix it. Thank you! :-)

@mhugent
Copy link
Contributor

mhugent commented Jun 16, 2014

Is it ok in 47cf096 ?

@luca76
Copy link
Contributor Author

luca76 commented Jun 16, 2014

see my comment: It should be on RULEITEM, too :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants