Where can i configure legend style by default in mapstore2-georchestra 2024 ?

37 views
Skip to first unread message

c.morales

unread,
Apr 9, 2025, 11:12:37 AMApr 9
to mapstore-users
Hi everyone.
In order to optimise our legends, in the 2023 release of MapStore2-georchestra I configured the following in the localConfig.json, desktop section, layerOptions:

{
"name": "TOC",
"cfg": {
"activateDownloadTool": false,
"activateMetedataTool": true,
"layerOptions": {
    "legendOptions": {
    "scaleDependent": true,
"legendStyle": {
"maxWidth": "250%"
        },
    "WMSLegendOptions": "forceLabels:on",
    "legendWidth": 30,
    "legendHeight": 20,
"legendContainerStyle": {
          "overflowX": "auto"
}
        }
    },...
...

With the TOC plugin improvements, this is no longer possible. Where and how can I get a similar configuration?
Thank you for your feedback.

Tobia Di Pisa

unread,
Apr 9, 2025, 11:32:02 AMApr 9
to mapstor...@googlegroups.com
Dear Catherine,

Nothing has changed on that side and it seems to be working on my side.
What is not working on your side precisely?

Regards,
     Tobia Di Pisa

--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mapstore-users/ba9dd251-da75-49e9-96f6-52116fc55b1bn%40googlegroups.com.


--


==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==
Dott. Ing. Tobia Di Pisa
Technical Lead / Project Manager


GeoSolutions Group
phone: +39 0584 962313

mobile: +39 340 1781783
fax:      +39 0584 1660272

https://www.geosolutionsgroup.com/
http://twitter.com/geosolutions_it
-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Stefano Bovio

unread,
Apr 9, 2025, 11:32:07 AMApr 9
to mapstor...@googlegroups.com
Hi,

I just did a quick test with a new layer imported in the map on master branch using the provided configuration for TOC plugin,
the overflowX and maxWidth seems applied:

image.png

also the GetLegendGraphic request is using the selected height, width and legend options:

image.png

Could you share a screenshot of the previous result? Or the expected one?

Hope this helps,
Thanks,

Stefano



--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mapstore-users/ba9dd251-da75-49e9-96f6-52116fc55b1bn%40googlegroups.com.


--

Regards,

Stefano Bovio

==

GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

==

Stefano Bovio

Frontend Software Engineer


GeoSolutions Group
phone: +39 0584 962313

Message has been deleted
Message has been deleted

c.morales

unread,
Apr 10, 2025, 11:16:11 AMApr 10
to mapstore-users

Hi ,

I've applied the configuration and it's OK for me.The GetLegendGrafic send the good parameters

getlegendgrafics.png

 I was expecting to see the parameters values 40 and 20 (defined in localConfig.json) in the TOC layer page but it's not the case. Parameters still be at 12,12


legend_ihm.png
Message has been deleted
Message has been deleted
Message has been deleted

c.morales

unread,
Apr 11, 2025, 3:53:51 AMApr 11
to mapstore-users
Ok thanks Lorenzo and Tobia, I didn't have the good link for the documentation, I was looking at https://mapstore2.geosolutionsgroup.com/mapstore/docs/api/plugins#plugins.TOC and there is no TOC plugin section in this link. (linked from the plugin from the context manager page).

I will try and give you the result.

Le mercredi 9 avril 2025 à 17:32:07 UTC+2, Stefano Bovio a écrit :

c.morales

unread,
Apr 11, 2025, 3:54:23 AMApr 11
to mapstore-users
Dear Tobia and Stefano,
It's OK for me. 
I've applied the configuration in LocalConfig.json.
The GetLegendGraphic  parameter is OK .
getlegendgrafics.png

 I was expecting to see the parameters values 40 and 20 (defined in localConfig.json) in the TOC page but it's not the case:

legend_ihm.png
Le mercredi 9 avril 2025 à 17:32:07 UTC+2, Stefano Bovio a écrit :
Message has been deleted
Message has been deleted

c.morales

unread,
Apr 11, 2025, 3:54:52 AMApr 11
to mapstore-users
I was looking at a bad link of the documentation where TOC plugin is not referenced : https://mapstore2.geosolutionsgroup.com/mapstore/docs/api/plugins#plugins.TOC.
This link is from this functionnality:
badlink.png
Reply all
Reply to author
Forward
0 new messages