Angle, given in degrees, to draw the label.
AUTO allows MapServer to compute the angle. Valid for LINE layers only.
FOLLOW was introduced in version 4.10 and tells MapServer to compute a curved label for appropriate linear features (see MS RFC 11: Support for Curved Labels for specifics).
[Attribute] was introduced in version 5.0, to specify the item name in the attribute table to use for angle values. The hard brackets [] are required. For example, if your shapefile’s DBF has a field named “MYANGLE” that holds angle values for each record, your LABEL object might contain:
LABEL
COLOR 150 150 150
OUTLINECOLOR 255 255 255
FONT sans
TYPE truetype
SIZE 6
ANGLE [MYANGLE]
POSITION AUTO
PARTIALS FALSE
END
The associated RFC document for this feature is MS RFC 19: Style & Label attribute binding.
Color to draw text with.
[Attribute] was introduced in version 5.0, to specify the item name in the attribute table to use for color values. The hard brackets [] are required. For example, if your shapefile’s DBF has a field named “MYCOLOR” that holds color values for each record, your LABEL object might contain:
LABEL
COLOR [MYCOLOR]
OUTLINECOLOR 255 255 255
FONT sans
TYPE truetype
SIZE 6
POSITION AUTO
PARTIALS FALSE
END
The associated RFC document for this feature is MS RFC 19: Style & Label attribute binding.
Supported encoding format to be used for labels. If the format is not supported, the label will not be drawn. Requires the iconv library (present on most systems). The library is always detected if present on the system, but if not the label will not be drawn.
Required for displaying international characters in MapServer. More information can be found at: http://www.foss4g.org/FOSS4G/MAPSERVER/mpsnf-i18n-en.html.
Introduced in mapserver 5.4, this keyword interacts with the WRAP keyword so that line breaks only occur after the defined number of characters
maxlength = 0 | maxlength > 0 | maxlength < 0 | |
wrap = ‘char’ | always wrap at the WRAP character | newline at the first WRAP character after MAXLENGTH characters | hard wrap (always break at exactly MAXLENGTH characters) |
no wrap | no processing | skip label if it contains more than MAXLENGTH characters | hard wrap (always break at exactly MAXLENGTH characters) |
The associated RFC document for this feature is MS RFC 40: Support Label Text Transformations.
Color to draw a one pixel outline around the text.
[Attribute] was introduced in version 5.0, to specify the item name in the attribute table to use for color values. The hard brackets [] are required. For example, if your shapefile’s DBF has a field named “MYOUTCOLOR” that holds color values for each record, your LABEL object might contain:
LABEL
COLOR 150 150 150
OUTLINECOLOR [MYOUTCOLOR]
FONT sans
TYPE truetype
SIZE 6
POSITION AUTO
PARTIALS FALSE
END
The associated RFC document for this feature is MS RFC 19: Style & Label attribute binding.
The priority parameter (added in v5.0) takes an integer value between 1 (lowest) and 10 (highest). The default value is 1. It is also possible to bind the priority to an attribute (item_name) using square brackets around the [item_name]. e.g. “PRIORITY [someattribute]”
Labels are stored in the label cache and rendered in order of priority, with the highest priority levels rendered first. Specifying an out of range PRIORITY value inside a map file will result in a parsing error. An out of range value set via MapScript or coming from a shape attribute will be clamped to the min/max values at rendering time. There is no expected impact on performance for using label priorities.
Text size. Use “integer” to give the size in pixels of your TrueType font based label, or any of the other 5 listed keywords to bitmap fonts.
[Attribute] was introduced in version 5.0, to specify the item name in the attribute table to use for size values. The hard brackets [] are required. For example, if your shapefile’s DBF has a field named “MYSIZE” that holds size values for each record, your LABEL object might contain:
LABEL
COLOR 150 150 150
OUTLINECOLOR 255 255 255
FONT sans
TYPE truetype
SIZE [MYSIZE]
POSITION AUTO
PARTIALS FALSE
END
The associated RFC document for this feature is MS RFC 19: Style & Label attribute binding.