The ruler element allows you to create coordinate ticks, coordinate labels and alternate fills along the frame. A ruler can be placed individually on all sides of the main frame, or on all sides at once.
You can place multiple rulers along the frame, either outside each other, or even on top of each other. For, example, you can place one ruler for a main division, and one for a subdivision.
Basically, a Ruler element sets up a region on a frame into which you can place [RulerLines], [RulerLabels] and [RulerFills].
Is either "grid" (default), which refers to the map projection coordinates, or "graticule". In order to create graticule-related rulers, a spatial reference system (srs) for the frame must be specified.
Specifies the location of the ruler(s) relative to the main frame. The following values are legal:
Specifies the distance in paper units from the main frame to the inner edge of the ruler. Positive values are outwards.
Specifies in paper units the width of the ruler, measured from the inner edge and outwards. Note that ruler lines (ticks) and ruler fills will refer to the entire width of the ruler.
Specifies in paper units the length added to each ruler end. The default value is "auto" which means that the the ruler is extended by the same amount as the offset value.
Specifies a background color for the ruler area. If omitted, will not paint any fill (default).
A Ruler can have zero or more instances of the following elements. The order determines the paint order, with the first element on top.
<Ruler type="grid" location="all" offset="0" width="2mm" >
<Border ... />
<RulerLabels ... > ... </RulerLabels>
<RulerLines ... />
<RulerFills ... />
</Ruler>
Wiki: Border
Wiki: MapFrame
Wiki: RulerFills
Wiki: RulerLabels
Wiki: RulerLines