I have a layer group named "town-location" in the GeoServer that contains one layer. I am trying to recover it with a specific style attaching to the GeoServer request the parameter "sld_body". However, despite I am getting the geometry correctly, the style is not being applied.

Here is the SLD:

<StyledLayerDescriptor version="1.0.0"    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
                                    <CssParameter name="fill">#14B214</CssParameter>
                                    <CssParameter name="fill-opacity">0.7</CssParameter>
                                    <CssParameter name="stroke">#A314E7</CssParameter>
                                    <CssParameter name="stroke-opacity">1</CssParameter>

And the request sent:

  service: WMS,
  request: GetMap,
  layers: town-location,
  format: image/png,
  transparent: true,
  version: 1.1.1,
  sld_body: (the SLD attached over),
  width: 1024,
  height: 512

The GeoServer version is 2.21.0, I have seen the logs and there is no errors. I tried to send the workspace name into the SLD (next to the layer group name) and it doesn't work neither. I even sent the request using the WMS version 1.3.0 without success.



Browse other questions tagged or ask your own question.