I have a GeoServer with a layer that is an SQL View containing a few polygons and a value. I made the SLD and I don't get why the label only shows up once in a while when the circle is partially out of view.
My SLD is now like this :
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/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>TestPolygons</Name>
<UserStyle>
<Title>Label in circle</Title>
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#A1B8BA</CssParameter>
<CssParameter name="fill-opacity">0.7</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#096437</CssParameter>
<CssParameter name="stroke-width">0.5</CssParameter>
</Stroke>
</PolygonSymbolizer>
<TextSymbolizer>
<Label>
<ogc:PropertyName>CircleValue</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">Arial</CssParameter>
<CssParameter name="font-size">10</CssParameter>
<CssParameter name="font-style">normal</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
</Font>
<LabelPlacement>
<PointPlacement>
</PointPlacement>
</LabelPlacement>
<Halo>
<Radius>1</Radius>
<Fill>
<CssParameter name="fill">#FFFFFF</CssParameter>
</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
I tried making a second Rule for the TextSymbolizer, I also tried putting the TextSymbolizer inside the PolygonSymbolizer (with and without the tag) and I always get this result. Any clue what I did wrong?