better legend rendering by dynamic legend widget

75 views
Skip to first unread message

Florian Hoedt

unread,
Jun 19, 2020, 10:21:24 AM6/19/20
to mapstore-developers
Hello,

Currently the legend graphics are rendered underneath the layer and only if switched active. This is cumbersome and will lead to many clicks and not fully comprehensive legend graphics. We would like to create a floating widget or dockable widget, which will show the current active layers style infos. Therefore it should read the current active style and use a getCapabilities request to fetch legend information from the <style> node to render needed info. Eg:

<Layer queryable="1" opaque="0">
 
<Name>EGs_Eigentumsarten_PolyVar</Name>
 
<Title>2. Waldeigentum</Title>
  [...]
 
<Style>
     
<Name>bwi3-tnr-voll1-shp:phTPEGs_pLand</Name>
     
<Title>1. Anteil Landeswald [%]</Title>
     
<Abstract>Flächenanteil [%] des Landeswald am Wald; Zeit: 2012; Quelle: BWI-2012</Abstract>
     
<LegendURL width="195" height="120"><Format>image/png</Format><OnlineResource xlink:type="simple" xlink:href="https://gdi.thuenen.de:443/geoserver/wo-bwi/bwi3-tnr-voll1-shp/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=EGs_Eigentumsarten_PolyVar"/></LegendURL>
 
</Style>
  [...]
</Layer>

This will ensure it will work also for OGC WMS remote services.

Pedro Guimarães

unread,
Jun 19, 2020, 10:28:01 AM6/19/20
to mapstore-...@googlegroups.com
Absolutely supported :) +1

Florian Hoedt

unread,
Jun 22, 2020, 11:02:38 AM6/22/20
to mapstore-developers
@Pedro

Do you have any additional ideas for the implementation? My draft above does not show any, yet.

Mauro Bartolomeoli

unread,
Jun 23, 2020, 11:23:18 AM6/23/20
to mapstore-...@googlegroups.com
Hi Florian,
I suggest you to have a look at the FloatingLegend plugin here: https://github.com/geosolutions-it/MapStore2/blob/master/web/client/plugins/FloatingLegend.jsx

It should be very similar to what you described.

Mauro


Il giorno lun 22 giu 2020 alle ore 17:02 Florian Hoedt <gann...@gmail.com> ha scritto:
@Pedro

Do you have any additional ideas for the implementation? My draft above does not show any, yet.

--
You received this message because you are subscribed to the Google Groups "mapstore-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-develo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mapstore-developers/dbf745dc-d810-422f-b64a-1bcfe730b581o%40googlegroups.com.


--

Regards,

Mauro Bartolomeoli

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==

Dott. Mauro Bartolomeoli
@mauro_bart
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy

mobile: +39 393 904 1756
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
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.

Michael Steigemann

unread,
Jun 14, 2021, 12:23:45 AM6/14/21
to mapstore-developers
Good morning!

Do you have an complete example for the floatinglayer plugin?

When I add 
, {
"name": "FloatingLegend",
"cfg": {
"expandedOnMount": true
   }
}

to my localConfig.json the floating legend appears for a short moment. After this short moment the TOC-Button is invisible and I can not reach the window again.

Thanks for feedback and all the best,
Michael
Reply all
Reply to author
Forward
0 new messages