[Geoserver-users] Center point label when rotation?

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.

shane_china ha scritto:

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?

I just tried with GeoServer 1.7.5 and it works fine for me?
I used a style with a point symbolizer and a text symbolizer superimposed to show the relative position of the two.

I've attached the style, which can be used against the sample
layer tiger:poi, and a screenshot showing what I get.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

rotation.png

poi.sld (2.34 KB)

I copy your style, but it doesn't work.
http://www.nabble.com/file/p24268982/label.jpg
I'm using version 1.7.2. I'll try it in version 1.7.5. Thank you very much.
--
View this message in context: http://www.nabble.com/Center-point-label-when-rotation--tp24261902p24268982.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I use new war, then it works. Thank you very much.
Maybe I delete something of geoserver carelessly
--
View this message in context: http://www.nabble.com/Center-point-label-when-rotation--tp24261902p24269493.html
Sent from the GeoServer - User mailing list archive at Nabble.com.