GeoServer – Auto Wrap Labels

Marketing
Marketing
  • Updated

by David Crowther

Geoserver 1.png

Question:

Is it possible to wrap labels when using GeoServer to style my WMS layers?

Answer:

Yes, this can be done by updating your Style file (SLD).

For example, here is a WMS layer using labels without wrapping.

Geoserver 2.jpg

If you update your Text Symbolizer adding the line highlighted below…

<se:TextSymbolizer>

<se:VendorOption name="autoWrap">10</se:VendorOption>

</se:TextSymbolizer>

…. this will then auto wrap your label. The value of 10, will be the number of characters allowed before wrapping occurs.

Geoserver 3.jpg

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.