2

I have following case. Map of highway with labeled points placed by some interval. Problem is with labels that are partially on particular tile. Sometimes they are not drawn completely. I tried to find out which code is responsible for exact drawing but geoserver is too complicated for me on first attempt. I'm looking for help with schema around drawing flow in just master branch of geoserver or any practical resolution of my case.

enter image description here

2

The quickest and easiest solution is to not tile your labels layer. However if this is not an option for you then read on.

In general GeoServer tries very hard not to draw labels that won't look good (for some value of good) - i.e. where they overlap, or fall off the side of the map as for most people these look ugly. However because the developers' idea of good may differ from yours as in this case there are a variety of helpful vendor-options (which are GeoServer extensions to the SLD standard) that allow you to override the labeling engine.

The labeling options page is the best place to start if you have a labeling issue with GeoServer, and for your issue you need to look at setting the partials option:

<VendorOption name="partials">true</VendorOption>

This will force the renderer to draw labels that fall off the edges of the map. You will have to provide a fixed point for the label to be drawn otherwise the label on the other side of the tile boundary will not line up. I've never tried this solution but I suspect you will need to set MetaTiling to be on too so that the off tile labels are drawn (so you get the matching ends of labels).

  • Y, some VendorOption(s) solved problem. – RobertW Aug 13 '15 at 7:28

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.