Graphics can be used to indicate bridges and ramps (roads connecting limited-access roads like motorways to other roads). They consist of an optional shadow under the bridge, and optional lines at the side of the bridge, with user-definable ends.

Bridge graphics are drawn for roads with the bridge attribute, and ramp graphics are drawn for those with the ramp attribute.

bridge1

The bridge graphics above are drawn using this style:

<bridge width='45m,2pt' border='dimgrey' borderWidth='14%,1' endPath='l 512 512' maxScale='50000'/>

You use the <bridge> or <ramp> tag inside a < layer> tag (or inside a <condition> in a layer). TheĀ <bridge> and <ramp> attributes are:

  • border: the border color
  • shadow: the shadow color
  • width: the width of the bridge (distance between bridge borders)
  • borderWidth: the width of the border strokes
  • shadowWidth: the width of the shadow
  • shadowOffsetX: x offset of the shadow, relative to the road
  • shadowOffsetY: y offset of the shadow, relative to the road
  • maxScale: maximum scale (denominator) at which the bridge graphics are drawn
  • endPath: a path, using SVG path syntax, for strokes appended to the ends of the bridge sides. It gives one of the four ends only: that of the top right end, if the bridge is drawn horizontally. The other ends are generated by transforming the path as needed. The path units are 1024ths of the line width unless modified by unitsPerLineWidth.
  • unitsPerLineWidth: the size of the units in endPath, defined as the number of units equal to the line width. The default value is 1024
  • fill: if present, the fill color for the bridge or ramp; if absent, the bridge or ramp inherits the road color.
  • lineBorder: if present, the line border color for the bridge or ramp; if absent, the bridge or ramp inherits the road's border color.
  • lineWidth: if present, the line width for the bridge or ramp; if absent, the bridge or ramp inherits the road's line width.
  • lineBorderWidth: if present, the line border width for the bridge or ramp; if absent, the bridge or ramp inherits the road's border width.

For all the dimensions, percentages are relative to the width of the road.

Style Sheets Directory