I exported SLD file from QGIS for a polygon layer and uploaded both the style and the layer on GeoServer. The layer in question below:
For some reason the label appears three times at the shown scale and as I zoom in it starts multiplying. And the Min/MaxScaleDenominator doesn't work on the label either.
Here is the code:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" version="1.1.0" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>project_hoorkommun_visu</se:Name>
<UserStyle>
<se:Name>project_hoorkommun_visu</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:PolygonSymbolizer>
<se:Fill>
<se:SvgParameter name="fill">#e3e987</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#388036</se:SvgParameter>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
<se:Rule>
<se:TextSymbolizer>
<se:Label>
<ogc:PropertyName>kommunnamn</ogc:PropertyName>
</se:Label>
<se:Font>
<se:SvgParameter name="font-family">Georgia</se:SvgParameter>
<se:SvgParameter name="font-size">18</se:SvgParameter>
<se:SvgParameter name="font-weight">bold</se:SvgParameter>
</se:Font>
<se:LabelPlacement>
<se:PointPlacement>
<se:AnchorPoint>
<se:AnchorPointX>0.5</se:AnchorPointX>
<se:AnchorPointY>0.5</se:AnchorPointY>
</se:AnchorPoint>
</se:PointPlacement>
</se:LabelPlacement>
<se:Fill>
<se:SvgParameter name="fill">#323232</se:SvgParameter>
</se:Fill>
</se:TextSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
