9.
Legend
Up one level
Defines how a legend is to be built. Legend components are built automatically from class objects from individual layers. Starts with the keyword LEGEND and terminates with the keyword END.
The size of the legend image is NOT known prior to creation so be careful not to hard-code width and height in the <IMG> tag in the template file.
- IMAGECOLOR [r] [g] [b]
- Color to initialize the legend with (i.e. the background).
- INTERLACE [on|off]
- Deprecated Default is [on]. This keyword is now depcrecated in favour of using the FORMATOPTION "INTERLACE=ON" line in the OUTPUTFORMAT declaration.
- LABEL
- Signals the start of a LABEL object
- OUTLINECOLOR [r] [g] [b]
- Color to use for outlining symbol key boxes.
- POSITION [ul|uc|ur|ll|lc|lr]
- Where to place an embedded legend in the map. Default is lr.
- KEYSIZE [x][y]
- Size of symbol key boxes in pixels. Default is 20 by 10.
- KEYSPACING [x][y]
- Spacing between symbol key boxes ([y]) and labels ([x]) in pixels. Default is 5 by 5.
- POSTLABELCACHE [true|false]
- Tells MapServer to render this legend after all labels in the cache have been drawn. Useful for adding neatlines and similar elements. Default is false.
- STATUS [on|off|embed]
- Is the legend image to be created.
- TEMPLATE [filename]
- HTML legend template file. Refer to the HTML Legend howto.
- TRANSPARENT [on|off]
- Deprecated Should the background color for the legend be transparent. This flag is now deprecated in favour of declaring transparency within OUTPUTFORMAT declarations. Default is off.