Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Geoserver TextSymbolizer rendering problem?

I use geoserver 2.0.1, I used textsymbolizer to labeling features on the map. It is likely geoserver not support '' tag because event I try to change font-size, font-family or .. it deosn't effect. How can I do labeling on the feature with different style?

like image 640
Sareuon Avatar asked Aug 04 '26 17:08

Sareuon


1 Answers

If you insert this into your <rule>...</rule> section, you should get something.

Just make sure that you provide the right property name (in the example blow: InfoMessage), which is the field that you want to display.

If the example below doesn't help, then please post your style, and describe what you're trying to achieve, so I can see what's going wrong.

      <TextSymbolizer>
        <Label>
          <ogc:PropertyName>InfoMessage</ogc:PropertyName>
        </Label>
        <Font>
          <CssParameter name="font-family">Arial</CssParameter>
          <CssParameter name="font-weight">Bold</CssParameter>
          <CssParameter name="font-size">14</CssParameter>
        </Font>
        <LabelPlacement>
          <PointPlacement>
            <AnchorPoint>
              <AnchorPointX>0.5</AnchorPointX>
              <AnchorPointY>0.5</AnchorPointY>
            </AnchorPoint>
            <Displacement>
              <DisplacementX>0</DisplacementX>
              <DisplacementY>-15</DisplacementY>
            </Displacement>
          </PointPlacement>
        </LabelPlacement>
        <Halo>
          <Radius>
            <ogc:Literal>2</ogc:Literal>
          </Radius>
          <Fill>
            <CssParameter name="fill">#FFFFFF</CssParameter>
          </Fill>
        </Halo>
        <Fill>
          <CssParameter name="fill">#000000</CssParameter>
        </Fill>
      </TextSymbolizer>
like image 174
Wouter van Nifterick Avatar answered Aug 08 '26 07:08

Wouter van Nifterick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!