我正在使用 GeoServer 环境。我正在尝试使用基于比例的 sld 设置字体大小。到目前为止,我有以下内容:
<CssParameter name="font-size">
<ogc:Mult>
<ogc:Function name="env">
<ogc:Literal>wms_scale_denominator</ogc:Literal>
</ogc:Function>
<ogc:Literal>.001</ogc:Literal>
</ogc:Mult>
</CssParameter>
但是在 GeoServer 中出现日志错误:“指定的字体大小为空”。为什么乘法功能无法设置字体大小?
更新:无需使用乘法功能根据比例设置字体大小。请改用 Categorize 函数,如下例所示。