0

使用 GeoServer 和 SLD 我正在尝试使用数字格式和连接,但是在数字格式之后生成了一个换行符:

<TextSymbolizer>
  <Label>
    <ogc:Function name="numberFormat">
      <ogc:Literal>###,###,###</ogc:Literal>
      <ogc:PropertyName>AREASQFT</ogc:PropertyName>
    </ogc:Function>
    <ogc:Literal>sq.ft.</ogc:Literal>
...

显示:

8,735
sq. ft.

我希望标签显示,例如:

8,735 sq. ft.

我尝试使用连接功能:

<TextSymbolizer>
  <Label>
    <ogc:Function name="Concatenate">
      <ogc:Function name="numberFormat">
        <ogc:Literal>###,###,###</ogc:Literal>
        <ogc:PropertyName>AREASQFT</ogc:PropertyName>
      </ogc:Function>
      <ogc:Literal>sq.ft.</ogc:Literal>
    </ogc:Function>
...

但我仍然得到一个换行符:

8,735
sq. ft.

任何帮助,将不胜感激。先谢谢了。

4

2 回答 2

1

我尝试使用 GeoServer 中的 poly_landmarks 示例进行您的第一个样式设置,使用 LAND 属性进行标签和数字格式设置。我在我的开发版本中获得了所需的行为。也许您可以使用较新版本的 GeoServer 进行测试。

于 2014-10-24T22:45:39.427 回答
0

我有一个类似的问题并<VendorOption name="autoWrap">50</VendorOption>在样式表中解决了它。另请参阅http://docs.geoserver.org/2.5.x/en/user/styling/sld-reference/labeling.html

于 2014-11-06T16:23:47.593 回答