Moxi Media Inc.
<scalebar> Discussion Forum
IMF Developer's Guide » Print Configuration » <template> » <scalebar>  

The <scalebar> element is used to add a scalebar to the map template. Note that if you want the scalebar to appear over the map, the scalebar should be defined in your XML file after the map element.

Note that the position attribute must be defined in the units defined by the units attribute of the <template> element, but the font-size is always defined in points.

Frequency Parent Elements (the <scalebar> element is valid within):
PO+ <template>
   

Frequency Description (in this context)
PO+ The <scaletext> element may appear one or more times within the <template> element in any order.
   

Attributes Description
divisions The number of divisions or sections of the scalebar. Integer value expected. Optional, defaults to "4".
font The font of the text, chosen from one of the following valid font names: "helvetica", "helvetica_bold", "helvetica_boldoblique", "helvetica_oblique", "times_roman", "times_bold", "times_bolditalic", "times_italic", "courier", "courier_bold", "courier_boldoblique", "courier_oblique". Optional, defaults to "helvetica".
font-size The font size for the scalebar text, expressed in points. Integer value expected, example: font-size="9". Optional, defaults to "9".
length The length of the scalebar, in points (72 points to an inch). Integer value expected. Note that the scalebar may be up to 5% larger or smaller than defined in order to create nice numbers for the divisions. Required.
locale-country Used to localize the display of the measurements to the format used in a particular region. If used, the locale-country attribute must be an upper-case, two-letter ISO Country Code as defined by ISO-3166. You can find a full list of these codes here. Optional, defaults to "US" (United States of America) if this attribute is not used.
locale-language Used to localize the display of the measurements to the format used in a particular region. If used, the locale-language attribute must be a lower-case, two-letter ISO Language Code as defined by ISO-639. You can find a full list of these codes here. Optional, defaults to "en" (English) if this attribute is not used.
position The page position of the lower left corner of the scalebar, expressed in the units specified in the units attribute of the <template> element. The position should be two numbers separated by a comma (with no white space), representing the x and y location. For example, if the units are "points", a value of "72,72" would indicate a position one inch from the left side and bottom side of the page. Required.
text-position The position of the text relative to the scalebar. Valid values are "top" or "bottom". Optional, defaults to "top".
units The measure units for the scalebar. Valid values are "metric" or "imperial". Optional, defaults to "metric".
   

Example:

<scalebar position="52,123" length="300" divisions="2" font="helvetica_bold" font-size="18"/>

Valid HTML 4.01!