Can MapServer center wrapped labels?

Steve Lime Steve.Lime at DNR.STATE.MN.US
Mon Nov 19 21:52:52 PST 2007


Hi John: The GD rendering software doesn't support text alignment although it's something
being discussed for 5.2. One possible work around would be to use a different class expression
to detect long labels and draw them differently. There's a length operator in the logical expression
support so you can have different classes based on the length of a string. If you're using PostGIS
perhaps there is the possibility of a custom function that would place a wrap character in the right
spot based on length? Just an idea.

Sorry...

Steve

>>> John Maurer <maurerj at NSIDC.ORG> 11/19/07 3:24 PM >>>
Hi everybody,
When using the WRAP keyword for labels, is there a way to also center 
them? I'm getting things like:

Greenland
Ice
Sheet

This would look a heck of a lot better on my maps centered as:

Greenland
      Ice
    Sheet

Or even better, if I could specify a max line length for the WRAP 
keyword and end up with:

Greenland
 Ice Sheet

Are either of these things possible? Couldn't find anything in the 
documentation so I'm guessing not??
Thanks!,
John Maurer

-- 
John Maurer
Web/Database Applications Engineer
National Snow and Ice Data Center (NSIDC)
University of Colorado at Boulder
http://cires.colorado.edu/~maurerj
+1-303-735-5316
------------------------------------
"Without geography, you're nowhere!"



More information about the MapServer-users mailing list