[mapserver-users] mapserver POSITION question

Daniel Morissette dmorissette at mapgears.com
Mon Jun 15 10:31:07 EDT 2009


Raivo Alla wrote:
> 
> As it could be seen on the picture
> (http://picasaweb.google.com/snaperski/Ort#5347526051315751666),
> street labels are strangely positioned in different ways.
> I want labels only when they have enough space to fit in
> (MINFEATURESIZE AUTO) and I want them
> centered. As it appears, sometimes they are aligned left, sometimes
> right, only lucky ones at the center.
> Those red boxes are to visualize vertex points.
> 

You are using "ANGLE AUTO" in your label definition. In this case, 
MapServer places the label at the center of the longest segment of the 
polyline that define the street, and follows the angle of that segment.

If you use ANGLE FOLLOW then the label will be placed at the center of 
the polyline itself (i.e. at total_length/2)... that should give the 
results that you expect.

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-users mailing list