Menu

Ruler

Agnar Renolen

Ruler

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].

Attributes

type

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.

location

Specifies the location of the ruler(s) relative to the main frame. The following values are legal:

  • top
  • left
  • right
  • bottom
  • top-bottom - bottom and top
  • left-right - left and right
  • all (default) - on all sides
offset

Specifies the distance in paper units from the main frame to the inner edge of the ruler. Positive values are outwards.

width

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.

extend

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.

bgcolor

Specifies a background color for the ruler area. If omitted, will not paint any fill (default).

Child Elements

A Ruler can have zero or more instances of the following elements. The order determines the paint order, with the first element on top.

Example

<Ruler type="grid" location="all" offset="0" width="2mm" >
   <Border ... />
   <RulerLabels ... > ... </RulerLabels>
   <RulerLines ... />
   <RulerFills ... />
</Ruler>

Related

Wiki: Border
Wiki: MapFrame
Wiki: RulerFills
Wiki: RulerLabels
Wiki: RulerLines

MongoDB Logo MongoDB