1

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"
    xmlns="http://www.opengis.net/sld"
    xmlns:ogc="http://www.opengis.net/ogc"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <NamedLayer>
        <Name>town-location</Name>
        <UserStyle>
            <IsDefault>1</IsDefault>
            <FeatureTypeStyle>
                <Rule>
                    <PointSymbolizer>
                        <Graphic>
                            <Mark>
                                <WellKnownName>circle</WellKnownName>
                                <Fill>
                                    <CssParameter name="fill">#14B214</CssParameter>
                                    <CssParameter name="fill-opacity">0.7</CssParameter>
                                </Fill>
                                <Stroke>
                                    <CssParameter name="stroke">#A314E7</CssParameter>
                                    <CssParameter name="stroke-opacity">1</CssParameter>
                                </Stroke>
                            </Mark>
                        </Graphic>
                    </PointSymbolizer>
                </Rule>
            </FeatureTypeStyle>
        </UserStyle>
    </NamedLayer>
</StyledLayerDescriptor>

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.

0

0

Browse other questions tagged or ask your own question.