Here is the description which I copied from GeoServer:

layers  Yes Layers to display on map. Value is a comma-separated list of layer names.
styles  Yes Styles in which layers are to be rendered. Value is a comma-separated list of style names, or empty if default styling is required. Style names may be empty in the list, to use default layer styling.

However, I have questions:

  1. Can 1 layer have multiple styles applied on it for just 1 GetMap request? e.g: layers=world_map&styles=style1,style2,style3 (with style1, style2 and style3 belong to world_map layer)
  2. Can multiple layers have only 1 style (i.e: this style is applied to all input layers or just the layer1)? e.g: layers=layer1,layer2,layer3,...&styles=style1 (with style1 belong to layer1)
  3. Can the number of layers and the number of styles be different? e.g: layers=layer1,layer2&style=style1,style2,style3,style4,style5? (with style1 and style2 belong to layer1, style3, style4 and style5 belong to layer2).

I think these 3 cases are valid?

1 Answer 1


The WMS 1.3.0 specification says in section

The mandatory STYLES parameter lists the style in which each layer is to be rendered. The value of the STYLES parameter is a comma-separated list of one or more valid style names. There is a one-to-one correspondence between the values in the LAYERS parameter and the values in the STYLES parameter. Each map in the list of LAYERS is drawn using the corresponding style in the same position in the list of STYLES.

So the answers are no, no, and no.

  • Thanks, that is easier to remember 1 Layer - 1 Style Commented Mar 25, 2020 at 13:51
  • The styles parameter isn't mandatory if a style is provided as part of an SLD_BODY or SLD parameter. You can have additive styles for a layer when you specify both a Style and a SLD or SLD_BODY parameter.
    – nmtoken
    Commented Mar 26, 2020 at 8:21

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.