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

Add support for LAYERFONTSIZE, ITEMFONTSIZE and SHOWFEATURECOUNT parameters (rif: GetLegendGraphic) #709

Merged
merged 4 commits into from
Feb 4, 2025

Conversation

volterra79
Copy link
Member

@volterra79 volterra79 commented Feb 3, 2025

• LAYERFONTSIZE

This parameter specifies the font size for rendering layer title in point.

wms_getlegendgraphic_layerfontsize

http://localhost/qgisserver?
SERVICE=WMS
&REQUEST=GetLegendGraphic
&LAYERS=airports,places
&BBOX=43.20,-2.93,49.35,8.32
&CRS=EPSG:4326
&TRANSPARENT=TRUE
&LAYERFONTSIZE=20

Rif: https://docs.qgis.org/3.34/en/docs/server_manual/services/wms.html#wms-getlegendgraphic-layerfontsize

• ITEMFONTSIZE

This parameter specifies the font size for rendering layer title in point.

wms_getlegendgraphic_itemfontsize

http://localhost/qgisserver?
SERVICE=WMS
&REQUEST=GetLegendGraphic
&LAYERS=airports,places
&BBOX=43.20,-2.93,49.35,8.32
&CRS=EPSG:4326
&TRANSPARENT=TRUE
&ITEMFONTSIZE=20

Rif: https://docs.qgis.org/3.34/en/docs/server_manual/services/wms.html#wms-getlegendgraphic-itemfontsize

• SHOWFEATURECOUNT

True/False: wether to activate feature count in the legend.

getfeaturecount_legend

@volterra79 volterra79 added bug Something isn't working backport to v3.11.x labels Feb 3, 2025
@volterra79 volterra79 added this to the v3.11 milestone Feb 3, 2025
@volterra79 volterra79 self-assigned this Feb 3, 2025
@volterra79 volterra79 changed the title ADD LAYERFONTSIZE and ITEMFONTSIZE missing. Get legend imgae from server only when legend TAB is active ADD LAYERFONTSIZE and ITEMFONTSIZE missing. Get legend image from server only when legend TAB is active Feb 3, 2025
@volterra79 volterra79 requested a review from Raruto February 3, 2025 15:16
@moovida
Copy link

moovida commented Feb 3, 2025

It would be amazing to also have the SHOWFEATURECOUNT attribute exposed. Then I think all of the supported that count would be in.

One left out is: ADDLAYERGROUPS, but honestly I am not sure if that is good to have in the suite and how that relates to grouping in general.

@volterra79
Copy link
Member Author

volterra79 commented Feb 3, 2025

ADDLAYERGROUPS

@moovida i think that for now ADDLAYERGROUPS can wait.

SHOWFEATURECOUNT added here: 8bd6973

@moovida
Copy link

moovida commented Feb 3, 2025

Completely agree with you. Thanks man!

volterra79 added a commit to g3w-suite/g3w-admin that referenced this pull request Feb 3, 2025
@Raruto Raruto changed the title ADD LAYERFONTSIZE and ITEMFONTSIZE missing. Get legend image from server only when legend TAB is active Add support for LAYERFONTSIZE and ITEMFONTSIZE parameters (GetLegendGraphic) Feb 4, 2025
@Raruto Raruto changed the title Add support for LAYERFONTSIZE and ITEMFONTSIZE parameters (GetLegendGraphic) Add support for LAYERFONTSIZE and ITEMFONTSIZE parameters (GetLegendGraphic) Feb 4, 2025
@Raruto Raruto changed the title Add support for LAYERFONTSIZE and ITEMFONTSIZE parameters (GetLegendGraphic) Add support for LAYERFONTSIZE and ITEMFONTSIZE parameters (rif: GetLegendGraphic) Feb 4, 2025
@Raruto Raruto changed the title Add support for LAYERFONTSIZE and ITEMFONTSIZE parameters (rif: GetLegendGraphic) Add support for LAYERFONTSIZE, ITEMFONTSIZE and SHOWFEATURECOUNT parameters (rif: GetLegendGraphic) Feb 4, 2025
@Raruto Raruto added feature New feature or request and removed bug Something isn't working labels Feb 4, 2025
@volterra79 volterra79 merged commit 6c7ae1d into dev Feb 4, 2025
1 check passed
@volterra79 volterra79 deleted the legend_params branch February 4, 2025 15:52
github-actions bot pushed a commit that referenced this pull request Feb 4, 2025
…` parameters (rif: `GetLegendGraphic`) (#709)

* 🐛 Get image only if legend tab is active

* 🐛 get legend parameter url boolen.
Add two param:
 - LAYERFONTSIZE,
 - ITEMFONTSIZE

* ✨ add showfeaturecount SHOWFEATURECOUNT

* Clean code space

(cherry picked from commit 6c7ae1d)
volterra79 added a commit that referenced this pull request Feb 4, 2025
…` parameters (rif: `GetLegendGraphic`) (#709) (#710)

* 🐛 Get image only if legend tab is active

* 🐛 get legend parameter url boolen.
Add two param:
 - LAYERFONTSIZE,
 - ITEMFONTSIZE

* ✨ add showfeaturecount SHOWFEATURECOUNT

* Clean code space

(cherry picked from commit 6c7ae1d)

Co-authored-by: Francesco Boccacci <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport to v3.11.x feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants