I want always put point at the center of label. The following is my code:
<TextSymbolizer>
<Label>
<ogc:PropertyName>name</ogc:PropertyName>
</Label>
<CssParameter name="font-weight">bold</CssParameter>
<CssParameter name="font-size">
<ogc:PropertyName>size</ogc:PropertyName>
</CssParameter>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>0.5</AnchorPointX>
<AnchorPointY>0.5</AnchorPointY>
</AnchorPoint>
<Displacement>
<DisplacementX>0</DisplacementX>
<DisplacementY>0</DisplacementY>
</Displacement>
<Rotation>
<ogc:PropertyName>rotation</ogc:PropertyName>
</Rotation>
</PointPlacement>
</LabelPlacement>
<Halo>
<Radius>
<ogc:Literal>2</ogc:Literal>
</Radius>
<Fill>
<CssParameter name="fill">#FFFFFF</CssParameter>
<CssParameter name="fill-opacity">0.85</CssParameter>
</Fill>
</Halo>
<Fill>
<CssParameter name="fill">
<ogc:PropertyName>color</ogc:PropertyName>
</CssParameter>
</Fill>
</TextSymbolizer>
When the rotation is 0, it works well. But if rotation> 0, the point will be
not at the center of the label. Anyone else ever encountered such problems
and could you help me?
--
View this message in context: http://www.nabble.com/Center-point-label-when-rotation--tp24261902p24261902.html
Sent from the GeoServer - User mailing list archive at Nabble.com.