[Mapserver-users] label angles
Gregory S. Williamson
gsw at globexplorer.com
Thu Nov 20 13:03:57 PST 2003
I think you need to use truetype and not bitmaps for auto angle to work.
Here is an excerpt from a file that works for me (Windows OS, MS 3.x):
NAME SSF
STATUS ON
SIZE 600 600
EXTENT 542724.08 4173551.37 557476.48 4187315.33
UNITS METERS
SHAPEPATH "DATA"
FONTSET "D:\Program Files\Apache Group\Apache2\htdocs\ssf\fonts\fonts.list"
This is the literal path; the fonts.list file is a simple file:
arial arial.ttf
arial-bold arialbd.ttf
garamond gara.ttf
garamond-bold garabd.ttf
The fonts (arial.ttf, etc. are all in that same directory).
Then when I have a line layer:
LAYER
NAME streets_ano1
GROUP streets
MINSCALE 5000
MAXSCALE 50000
STATUS OFF
DATA roads
TYPE ANNOTATION
LABELCACHE ON
CLASS
COLOR 10 150 150
TEXT ([FENAME] [FETYPE])
LABEL
ANGLE auto
ANTIALIAS true
MINFEATURESIZE 25
MINDISTANCE 100
POSITION CC
TYPE TRUETYPE
FONT arial-bold
SIZE 9
BUFFER 5
COLOR 255 255 255
OUTLINECOLOR 0 0 0
END
END
PROJECTION
"init=epsg:4269"
END
END # County streets upper
Note the SIZE is a number (for trutype) and the font name is in the fonts.list file. This seems to behave as advertised.
HTH,
Greg Williamson
DBA GlobeXplorer LLC
-----Original Message-----
From: Michael Smith [mailto:msmith at sanangelompo.org]
Sent: Thu 11/20/2003 9:25 AM
To: mapserver-users at lists.gis.umn.edu; Sebastian Albrecht
Cc:
Subject: RE: [Mapserver-users] label angles
That does not seem to work, I must be doing something wrong. Here is a
portion of my map file can you or anyone tell me if this looks correct?
LAYER
NAME "Roads"
GROUP "roads"
STATUS ON
DATA "tgrds"
TYPE LINE
LABELITEM "street"
CLASS
NAME "Streets & Roads" #this title appears in legend
#SYMBOL 'symbols/ctyhwy.gif'
TEMPLATE "tgrds.html"
COLOR 0 0 0 #212 208 200
LABEL
SIZE TINY #tinysmallmediumlargegiant
POSITION UC
ANGLE AUTO
BUFFER 2 #40 how close label are to each other
MINDISTANCE 150
MINFEATURESIZE 30
#FONT arial-bold
#SIZE 12
COLOR 0 0 0
SHADOWCOLOR 218 218 218
SHADOWSIZE 2 2
END #label
END # Class
HEADER "tgrds_header.html"
FOOTER "tgrds_footer.html"
TOLERANCE 5
DUMP TRUE # allow GML export
END # Layer
-----Original Message-----
From: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf Of Sebastian
Albrecht
Sent: Wednesday, November 19, 2003 10:32 AM
To: Michael Smith
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] label angles
Hi Michael,
> I am running IIS 5.0, windows 2000, and Mapserver 4. Is there a way to
get
> my street labels to follow the curvature of the streets? Thanks in
advance.
Have a look at the Mapserver documentation.
There is the ANGLE feature within the LABEL object.
Set it to ANGLE AUTO and your labels will follow the curvature of your
streets. I think you need to have mapserver compiled with truetype
support and your layer has to be of type LINE.
Regards,
Sebastian Albrecht
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list