I use GeoServer 2.1.1. and have an SLD to serve a layer with labels in OpenLayers. I noticed that some labels are not displayed because other labels are to near. GeoServer wants to make your labels look nice. Weird enough: I don't. Using the VendorOptions in the SLD I figured out some of the problems. I read the SLD cookbook. I am now using:
<TextSymbolizer> ... <VendorOption name="spaceAround">-1</VendorOption> <VendorOption name="conflictResolution">false</VendorOption> ... </TextSymbolizer>
These two options makes GeoServer draw multiple labels on top of each other even though it will render the labels unreadable (which is what I require).
The problem that still remains is the positioning of the labels. I have the labels set to:
<LabelPlacement> <PointPlacement> <AnchorPoint> <AnchorPointX>0.5</AnchorPointX> <AnchorPointY>0.5</AnchorPointY> </AnchorPoint> </PointPlacement> </LabelPlacement>
But as soon as the labels are to near of the edge of the image/bounds the it no longer centers the labels but will anchor it left or right depending on the position.
My question if someone knows how I can make GeoServer ignore trying to make it look so damn nice (I know it sounds weird!) and just let my labels run out of the image/bounds.