将添加到 <se:TextSymbolizer> 和 <se:Label> 之间
<se:Geometry>
<ogc:Function name=”centroid”>
<ogc:PropertyName>the_geom</ogc:PropertyName>
</ogc:Function>
</se:Geometry>
尝试了多次预览图层时,下载wms名称的文件,打开wms文件,显示下面的错误
The requested Style can not be used with this layer. The style specifies an attribute named 'the_geom', not found in the 'xxxx:xxxx' layer
将上述代码中的the_geom与多边形数据在postgresql中的字段名称一致。