Scalebars currently do not make use of TrueType fonts. The size of the scalebar image is NOT known prior to rendering, so be careful not to hard-code width and height in the <IMG> tag in the template file. Future versions will make the image size available.

ALIGN [left|center|right]

Defines how the scalebar is aligned within the scalebar image. Default is center. Available in versions 5.2 and higher.

New in version 5.2.

Color to use for scalebar background, not the image background.
COLOR [r] [g] [b]
Color to use for drawing all features if attribute tables are not used.
IMAGECOLOR [r] [g] [b]
Color to initialize the scalebar with (i.e. background).
INTERLACE [true|false]

Should output images be interlaced? Default is [on]. This keyword is now deprecated in favour of using the FORMATOPTION “INTERLACE=ON” line in the OUTPUTFORMAT declaration.

Deprecated since version 4.6.

INTERVALS [integer]
Number of intervals to break the scalebar into. Default is 4.
Signals the start of a LABEL object.
OUTLINECOLOR [r] [g] [b]
Color to use for outlining individual intervals. Set any component to -1 for no outline which is the default.
POSITION [ul|uc|ur|ll|lc|lr]
Where to place an embedded scalebar in the image. Default is lr.
For use with embedded scalebars only. Tells the MapServer to embed the scalebar after all labels in the cache have been drawn. Default is false.
SIZE [x][y]
Size in pixels of the scalebar. Labeling is not taken into account.
STATUS [on|off|embed]
Is the scalebar image to be created, and if so should it be embedded into the image? Default is off. (Please note that embedding scalebars require that you define a markerset. In essence the scalebar becomes a custom marker that is handled just like any other annotation.)
STYLE [integer]
Chooses the scalebar style. Valid styles are 0 and 1.

Should the background color for the scalebar be transparent. This flag is now deprecated in favor of declaring transparency within OUTPUTFORMAT declarations. Default is off.

Deprecated since version 4.6.

UNITS [feet|inches|kilometers|meters|miles|nauticalmiles]
Output scalebar units, default is miles. Used in conjunction with the map’s units to develop the actual graphic. Note that decimal degrees are not valid scalebar units. Nauticalmiles was added in MapServer 5.6.