How is possible to add a custom string to the label of shape in SLD? without any predefined ogc:PropertyName
means I want to add a constant string (in my case " BS") to the field "Area", example: "1200 BC"
there is no PropertyName
called "BC"
<Rule>
<Name>rule 1</Name>
<Title>Post Label</Title>
<TextSymbolizer>
<Label>
<ogc:Function name="round">
<ogc:PropertyName>year</ogc:PropertyName>
</ogc:Function>
</Label>
<Font>
<CssParameter name="font-family">Arial</CssParameter>
<CssParameter name="font-size">11</CssParameter>
<CssParameter name="font-style">normal</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
</Font>
<LabelPlacement>
<LinePlacement/>
</LabelPlacement>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
</TextSymbolizer>
</Rule>
Best Answer
You just ad BC to the label line.
Produces a map like: