[mapserver-users] ANGLE AUTO labels with TRUETYPE and LINE features. The text is displayed wrong.

Dan Keith bud at otsys.com
Fri Mar 22 03:46:35 EST 2002


I have a shape file containing road definitions in the form of line 
segments. Using mapserver, I can draw the layer and its segments and 
the labels for the highway segments. So I have no problems with my 
shapefile and its interaction with mapserver.

My problem is in the appearance of the angled labels with respect to 
the segments that they are labelling. Note that I am using the 
mapserver feature that automatically calculates the angle (as opposed 
to obtaining it from the shapefile's .dbf).

Using the ANGLE AUTO feature on the labels, I can get the label 
angles to closely match the angle of the segment, but not quite. 
Usually, there is a 10-degree difference in the two angles, which 
causes the label to drift away or towards the road segment.

I'm wondering if others have noticed this behavior, and whether this 
is something that is fixable (or controllable). I've tried various 
combinations of the POSITION and OFFSET fields of the LABEL. So far, 
the best I've come up with is a label positioned above the road 
segment with a small amount of space between the label and the road. 
I use:

         LABEL
             TYPE                TRUETYPE
             ANTIALIAS           TRUE
             FONT                Arial
             ANGLE               AUTO
             POSITION            AUTO
             COLOR               0 0 0
             SIZE                8
         END

I was hoping someone out there could tell me whether mapserver can be 
made to behave better.

thanks,
dan keith (bud at otsys.com)



-- 
Dan "Bud" Keith - bud at otsys.com



More information about the mapserver-users mailing list