The <shape> section in a <layer> controls the drawing of polygons. The <shape> attributes are

  • fill: the color used to fill the polygon; omit this if the polygon is not to be filled
  • border: the color used to draw the border; omit this if no border is wanted; if it is specified, but borderWidth is omitted, the border is drawn one pixel wide
  • borderWidth: the width of the border
  • opacity: the opacity of both the fill and border colors. To set the fill and border opacity values separately, use the #RRGGBB or #RRGGBBAA form for specifying the colors
  • dashArray: a dashed border can be drawn by supplying a list of numbers giving the lengths of the filled-in sections and the gaps between them, in units of the width of the border (given by the borderWidth attribute). For example, the value '1,2' specifies dashes one unit long and gaps two units long. The list of numbers can be any length.

Example:

<shape fill="lightgray" border="darkgray" borderWidth="10m" opacity="0.5"/>

Style Sheets Directory