I want to be able to draw labels with line. How can i do this?

Just like labels with line of some USA states in Google Maps, labels with red line in right :

Example from Google Maps

  • 1
    Welcome to GIS SE! Please add more details. An illustration perhaps? Your question is rather vague right now.
    – R.K.
    Commented Nov 16, 2012 at 1:31

1 Answer 1


add a text symbolizer to your rule (the same way you label any other feature) - see http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/lines.html#line-with-default-label for full details.

  • 1
    Thanks, i didnt mean labels for lines, but lines for labels. Commented Nov 16, 2012 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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