开发者

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 eff开发者_开发知识库ect. How can I do labeling on the feature with different style?


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜