Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In google map all the labels are rendering well and there are none missing. In my map some times only the point marker is showing and the label is not displaying.

I am asking about "Auto align and AUTO OFFSET" OPTION in geoserver like mapserver.

In this image all the labels are shown in different offset.

enter image description here

What do I have to change in my SLD?

share|improve this question
up vote 1 down vote accepted

You are probably looking for the maxDisplacement vendor option:

Also have a look at the other options, autoWrap also increases quite a bit the look of a map with long labels

share|improve this answer
Thanks a lot friend, Now my map labels working very nice.But friend In some area duplicate labels(shows same lable more than one time) appearing.Note:I am not using "Repeat option".How can i solve it?Please help.. – Mohammed shafeek Aug 13 '12 at 7:02
If you are using a tiled client there is no real way out of it, I'm afraid. If you don't want any duplicate label you'll have to use un-tiled requests. A workaround for polygons is to have the SLD extract the centroid using something like <sld:geometry><ogc:Function name="centroid"><ogc:PropertyName>name_of_your_geometry_column</ogc:PropertyName‌​></ogc:Function><sld:geometry> (the syntax might be slightly off, I did not test it), but the moment you do some labels will disappear because they fall at the borders of tiles – Andrea Aime Aug 13 '12 at 9:50

To render label with auto rotation in geoserver, you will have to use the optional element in your SLD definition:


In case you want to use attribute value, you can even use PropertyName tag within Rotation tag.


Since your image is not uploaded properly, I assume your labels are sometimes not visible because of conflictResolution porperty in your SLD definition. You can check out using :

<VendorOption name="conflictResolution">false</VendorOption>

This will force all labels to be drawn even if they overlap each other.

share|improve this answer
I am sorry,I am new at this site.Dear I am asking about "Auto align and AUTO OFFSET" OPTION in geoserver like mapserver. Please look at this link " here all labels are shown in different offset. – Mohammed shafeek Aug 8 '12 at 12:01
Unfortunately your attachment is still invalid. For align use <AnchorPoint> tag and for offset use <Displacement> tag. More detail here – thelastray Aug 8 '12 at 12:09
Now with the map appearing, I understand what you are looking for. The labels in Google map is zoom based. All labels are not visible at smaller scales in google map. As you go on zooming, more labels appear. You also can achieve this using <MinScaleDenominator> and <MaxScaleDenominator> within your <Rule> tag. – thelastray Aug 8 '12 at 12:44 . See the links on the left of the page for even more detailed information is there.

share|improve this answer
It is best to provide stand-alone answers that are not link-only because once the link becomes defunct so to does the answer. More details here:… – Aaron Aug 25 '15 at 12:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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