I have a group layer in geoserver with all layers having one style each.

However, for the legend I want to refer to an "external" SLD (basically a simplified "dummy legend"). The SLD is in the same workspace as the group layer and I guess you can specify the SLD you want to get by GetLegendGraphic Parameters? Here specifically, I'm thinking of the SLD parameter.

The solution (I think) is something like this:


In the SLD documentation it says thatt you can refer to an external SLD by a URL. How do i know what URL to use as a parameter?

1 Answer 1


If your style is already published by GeoServer then you can just use the style parameter in the GetLegend request:


If you need to send specific SLD then the process is the same as sending it for a layer as discussed in this question and the manual

  • Makes perfect sense, problem solved! Thanks! Commented Feb 16, 2022 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.