OptionalbeforeLayer positioning for the border/outline layer only.
Overrides the top-level GeometriesModuleConfig.beforeLayerConfig for the border. Pair with GeometryFillConfig.beforeLayerConfig to split the fill and border across the layer stack (e.g. fill below roads, border on top).
OptionalcolorBorder/outline color: a hex string or a MapLibre expression (e.g. ['get', 'borderColor']).
OptionallayerEscape hatch for full control over the border (outline) line layer.
Accepts a partial MapLibre LineLayerSpecification (without id/source) that is merged
onto the outline layer: top-level fields first, then layout and paint are merged per
property so base defaults survive. Use this to set any line property the curated fields above
don't cover (e.g. line-gap-width, line-cap, line-join, line-pattern).
The curated fields (color, opacity, width) take precedence over the same paint
properties set here.
OptionalopacityBorder opacity, 0 (transparent) to 1 (opaque). Also accepts a MapLibre expression.
OptionalwidthBorder width in pixels. Also accepts a MapLibre expression
(e.g. ['case', ['get', 'selected'], 4, 2]).
Line/border configuration for geometries — the outline color, opacity, width, an escape hatch for any other line property, and (optionally) where the border layer sits in the map's layer stack.
Remarks
The curated
color/opacity/widthfields cover the common cases; thelayerescape hatch accepts a partial MapLibreLineLayerSpecificationfor anything else (line-gap-width,line-cap,line-join, …). The curated fields take precedence over the samepaintproperty set vialayer.Example