A BorderStyle describes how the inner or outer border of a closed shape is rendered.

Borders are rendered only for closed shapes, for instance: polygon, circle, ellipse, buffer, arc band. Non-closed shapes, such as polylines, points, or arcs, are painted without border. Extruded shapes are visualized with borders only on 2D maps.

The inner border stroke is drawn on the inner side of shape and the outer border stroke is drawn on the outer side of shape. If shape style is defined with the fill, stroke, inner and outer border style then the borders are drawn after rendering the fill style and before rendering the stroke style.

Border Painter

Since

2019.0

// ShapeStyle object literal that uses Border style to draw inner and outer border
var style = {
innerBorder: {
color: "rgba(12, 2, 110, 0.25)",
width: 12
},
outerBorder: {
color: "rgba(12, 2, 110, 0.5)",
width: 3
},
stroke: { width: 2 }
};

Hierarchy

  • BorderStyle

Properties

Properties

color: string

The CSS color string of the border.

The uom determines the interpretation of the width as pixels or as a ground unit that represents the actual size of real-world objects, like for example meter of foot.

Supported UnitOfMeasures are:

  • UnitOfMeasureRegistry.getUnitOfMeasure("Pixels")
  • UnitOfMeasure of type QuantityKindRegistry.getQuantityKind("Length")

The uom property is only taken into account on geographically referenced maps.

The property is optional and the default value is the Pixel unit.

width: number

The width of the border.