Suppose i want to group 2 or more style of different layers into one SLD file. How can i do it ?

A pointer towards the working example or document will do.

Or any alternative styling example such as CSS will do it it fits in above requirements.


1 Answer 1


The SLD can contain multiple < NamedLayer > allowing you to have multiple styles for multiple layers in a single SLD. In Geoserver you can apply a "Style Group" from within the "Layer Groups" menu item. You need to put all of your layers into a Layer Group first. The Layer Group can then access the Style Group (which is an SLD with more than one < NamedLayer >). Hope that helps!

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.