Skip to main content

Function: customizeBoundaryGroup()

customizeBoundaryGroup(group, overrides): BoundaryGroup

Defined in: spec/boundaryGroup.ts:169

Returns a new BoundaryGroup with overridden paint properties on every line layer. The original group is not mutated.

Only lineColor and lineWidth are supported — non-line layers are returned unchanged.

Parameters

ParameterTypeDescription
groupBoundaryGroupThe boundary group to customize.
overridesBoundaryPaintOverridesPartial paint properties to apply.

Returns

BoundaryGroup

A new BoundaryGroup with the overridden paint applied to line layers.

Example

const thickStates = customizeBoundaryGroup(statesGroup, {
lineColor: '#ef4444',
lineWidth: 3,
});