We are styling an SDE layer of polygons. We want to display the polygon labels offset from the centre of the map image when zoomed into a single polygon, so that the label is readable when zooming to a point (which is using a client-side icon, so obscuring the label).
We are trying to set the SLD PointPlacement Displacement values to do this, but this does not seem to change the location of the generated labels. SLD is below. Are there any known issues with this? Or is there something wrong with the style? Version is Geoserver 1.12.1. --------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns=" http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" version="1.0.0"> <sld:NamedLayer> <sld:Name>Default Styler</sld:Name> <sld:UserStyle> <sld:Name>Default Styler</sld:Name> <sld:FeatureTypeStyle> <sld:Name>name</sld:Name> <sld:Rule> <sld:LineSymbolizer> <sld:Stroke> <sld:CssParameter name="stroke">#FFFFFF</sld:CssParameter> <sld:CssParameter name="stroke-width">4</sld:CssParameter> </sld:Stroke> </sld:LineSymbolizer> <sld:LineSymbolizer> <sld:Stroke> <sld:CssParameter name="stroke-width">2.75</sld:CssParameter> </sld:Stroke> </sld:LineSymbolizer> </sld:Rule> <sld:Rule> <sld:TextSymbolizer> <sld:Label> <ogc:PropertyName>FIRE_CENTRE</ogc:PropertyName> </sld:Label> <sld:Font> <sld:CssParameter name="font-family">Arial</sld:CssParameter> <sld:CssParameter name="font-size">18</sld:CssParameter> <sld:CssParameter name="font-style">normal</sld:CssParameter> <sld:CssParameter name="font-weight">normal</sld:CssParameter> </sld:Font> <sld:LabelPlacement> <sld:PointPlacement> <sld:AnchorPoint> <sld:AnchorPointX>0.5</sld:AnchorPointX> <sld:AnchorPointY>0.0</sld:AnchorPointY> </sld:AnchorPoint> <sld:Displacement> <sld:DisplacementX>0</sld:DisplacementX> <sld:DisplacementY>50</sld:DisplacementY> </sld:Displacement> </sld:PointPlacement> </sld:LabelPlacement> <sld:Halo> <sld:Radius>3</sld:Radius> <sld:Fill> <sld:CssParameter name="fill">#FFFFFF</sld:CssParameter> </sld:Fill> </sld:Halo> <sld:Fill> <sld:CssParameter name="fill">#000000</sld:CssParameter> </sld:Fill> <sld:VendorOption name="maxDisplacement">100</sld:VendorOption> </sld:TextSymbolizer> </sld:Rule> </sld:FeatureTypeStyle> </sld:UserStyle> </sld:NamedLayer> </sld:StyledLayerDescriptor>
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users