[mapserver-users] Label alignment

Stephen Woodbridge woodbri at swoodbridge.com
Tue Mar 13 21:35:04 EDT 2012

I'm not sure I understand all of these issues, but have you tried 
concatenating all the your test into a multiple line string and use a 
special character as the line break indicator, say an '@' char. Then in 
the LABEL block use WRAP '@'

You can also use ALIGN CENTER|LEFT|RIGHT to control the alignment of the 
wrapped text.

In 6.2 (trunk) you can also have multiple LABEL blocks in a class and 
can control the position of each using OFFSET x y to nudge you text into 

-Steve W

On 3/13/2012 9:26 PM, Ian Walberg wrote:
> Folks,
> I am not sure what the correct terminology is for our current issue but
> let me give explaining it a try.
> We are using a label layer with transform off to display some overview
> information on a map.
> The text sometimes needs to be lined up horizontally or spaced evenly
> vertically.
> It appears that the text function is using the outer perimeter of the
> text as the anchor point for the location.
> So in the case where there are characters which drop below the normal
> text line (e.g. g, y p, j, q) then the text is not aligned as we would
> hope. The same is true for the top of the text with different characters
> of course.
> The text is then not aligned as you would expect if different labels are
> drawn say 3 in a row horizontally at the same vertical location.
> If we concatenate the labels to a single string this helps the
> individual lines but is misaligned vertically.
> So is there any way (or any plans) to help this? It could be that at
> alignment mode that is relative to either end of the line (not sure what
> it’s called) under the text would be what we need. This could also in
> some instances tidy up more traditional labels as they would be draw a
> little more naturally relative to the point.
> Looking forward to your thoughts and comments.
> Thanks
> Ian
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

More information about the mapserver-users mailing list