1

I have a problem in labeling.Labels of near by points get overlapping.If I use spacearound option label of any of the poi displaysenter image description here

In the above picture Bank of Baroda and Central bank of India get overlapped.I want to display the label of Bank of Baroda into left side of the point.I used maxdisplacement option.But still it is not working.

I used the following otion in my SLD

"maxDisplacement"=15

"spaceAround"=-1

Is there any option in geoserver that change the position of the label automatically when it gets overlapped

2

The Geoserver documentation says:

By default GeoServer will not render labels “on top of each other”. By using the spaceAround option you can either allow labels to overlap, or add extra space around labels

You are using a negative value for spaceAround.

You should use a positive amount. You can only find the ideal value by trial and error. I'll start with 5 and then play around with the value to get the optimal value.

  • If I use spaceAround with positive value label wont be display in the last zoom level.Because points are so near. – Sreesha Jan 3 '14 at 11:41
  • 1
    making sure that all labels are seen, and that they do not overlap, are two competing requirements, and come at a cost of each other. You need to compromise somewhere. – Devdatta Tengshe Jan 3 '14 at 11:46
  • I want to know what will be the value of maxDisplacement. – Sreesha Jan 3 '14 at 11:56
  • It will be whatever you supply in the SLD – Devdatta Tengshe Jan 3 '14 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.