signature
Arnulf Christl
arnulf.christl at CCGIS.DE
Thu Sep 1 03:25:39 PDT 2005
Leopold Schefcik (MULTIMEDIAPLAN.AT) wrote:
> hi list,
>
> how can I get a signature (e.g. for streets) in my map?
>
> best regards,
> Leopold
Probably you would want to use the label object to do that.
http://mapserver.gis.umn.edu/doc46/mapfile-reference.html#label
(There is also a German version to read up on:
http://www.umn-mapserver.de/doc44/mapfile-reference44.html#label)
Labels can be positioned automatically or explicitly. For street maps
ideally you have a line geometry with an attribute that contains the
text to display. The angle of the text can either be defined using an
explicit field specified in the LABELANGLEITEM parameter. If ANGLE is
set to AUTO MapServer will render the streetnames with the inclination
of the line feature. AUTO is valid for LINE layers only.
This is a snippet from a MAP file
[...]
TYPE ANNOTATION
...
CLASSITEM zvs_code
LABELITEM label_text
# choose one:
# ANGLE [double]
# ANGLE AUTO
# LABELANGLEITEM label_rotation
SYMBOLSCALE 2000
CLASS
NAME "BAB"
EXPRESSION /1/
MINSCALE 0
MAXSCALE 15000
LABEL
TYPE TRUETYPE
COLOR 0 0 0
FONT "arialnarrow"
POSITION AUTO # depends on selection above
PARTIALS FALSE
FORCE TRUE
MINDISTANCE -1
SIZE 34
END
END
CLASS
NAME "Landesstr."
EXPRESSION /2/
MINSCALE 0
MAXSCALE 15000
LABEL
TYPE TRUETYPE
COLOR 0 0 0
FONT "arialnarrow"
POSITION uc
PARTIALS FALSE
FORCE TRUE
MINDISTANCE -1
SIZE 28
END
END
[...]
Best,
Arnulf
More information about the MapServer-users
mailing list