GetLegend Layer group

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GetLegend Layer group

Olyster
Hi,

I'm using 2.14.0.

The WMS GetCapabilities doesn't contain a section "LegendURL" for layers
group. This results in no Legend in client programs.

If you call the GetLegendGraphic explicitly for a Layer group, the legend is
returned.

For now we modify the GetCapabilities by hand to add a LegendURL section.
The client now shows a Legend for layer groups.

Is it that only way to enable Legend for layer groups ?

Thanks



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GetLegend Layer group

Jonathan Moules-4
Hi,

There's a thread from 2010 that may relate to this:
https://sourceforge.net/p/geoserver/mailman/message/24434518/ - unless
something has changed since then, the answer appears to be - either do
it manually, or have the code changed.

Curiously, if I'm reading the SLD/WMS specs correctly, "LegendURL"
(defined in WMS) isn't necessarily related to GetLegendGraphic (defined
in SLD). It *can* be, but the SLD spec says that GetLegendGraphic can be
used to extend the LegendURL. The original LegendURL was I guess
therefore designed for fixed images? Maybe you can create pre-rendered
graphics (scripted?) and point GeoServer at them?

Or maybe a script to automatically add them for any layers that are
missing them?

Just a thought, hopefully helps,
Jonathan


On 2019-01-24 21:38, Olyster wrote:

> Hi,
>
> I'm using 2.14.0.
>
> The WMS GetCapabilities doesn't contain a section "LegendURL" for layers
> group. This results in no Legend in client programs.
>
> If you call the GetLegendGraphic explicitly for a Layer group, the legend is
> returned.
>
> For now we modify the GetCapabilities by hand to add a LegendURL section.
> The client now shows a Legend for layer groups.
>
> Is it that only way to enable Legend for layer groups ?
>
> Thanks
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html
>
>
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to this list:
> - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users




_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GetLegend Layer group

Olyster
Jonathan,

Since Geoserver is able to generate a Legend using GetLegendGraphic call,
I'm wondering why it's not defined in GetCapabilities.

As stated, if I add it manually in GetCapabilities, the client program shows
a legend for a layer group.

We will be using a script to add the <LegendURL> section.

Thanks



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GetLegend Layer group

geowolf
In reply to this post by Olyster
Hi Olyster,
once upon a time there was no way to build a legend for groups, thus no link.
Eventually support for multi-layer and layer groups legend was added, but it seems the link
was not included in the capabilities output.

On Thu, Jan 24, 2019 at 10:45 PM Olyster <[hidden email]> wrote:
Is it that only way to enable Legend for layer groups ?

There is a better way, change the code so that it adds the link to the working graphic. :-)
You might also want to add a ticket in Jira (check first if there is one already, or not)

Cheers
Andrea

== GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 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.



_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users