Table of Contents |
---|
For more information on the use of EXPRESSIONs please refer to the MapServer Documentation.
With a CLASSITEM
If you wish to use more complicated styles for say OS MasterMap layers then you can use the following which will colour according to the value of a field name using EXPRESSION. It is also advisable to have a CLASS entry at the bottom of the list as a “catch all” style for the layer:
...
GoLoader holds text as lines that require labeling.
Code Block | ||
---|---|---|
| ||
LABELITEM "TEXTSTRING" #LABELANGLEITEM "OGR:LabelAngle" MINSCALE 1 MAXSCALE 4000 #REQUIRES "![Aerial]" #STYLEITEM "auto" CLASSITEM "FEATURECODE" CLASS EXPRESSION ([FEATURECODE] == 10026 OR [FEATURECODE] == 10166 OR [FEATURECODE] == 10178 OR [FEATURECODE] == 10184) LABEL FONT "arial" TYPE TRUETYPE ANTIALIAS TRUE COLOR 0 0 0 OUTLINECOLOR 230 230 230 SIZE 7 POSITION cc ANGLE AUTO END END CLASS EXPRESSION ([FEATURECODE] == 10033) LABEL FONT "arialbd" TYPE TRUETYPE #ANTIALIAS TRUE COLOR 153 153 153 #OUTLINECOLOR 255 255 255 SIZE 15 POSITION cc ANGLE AUTO END END |
...