This is the documentation of version 0.62.3. Go to the latest version, 1.0.0-rc.5.

Borrowed looks

A few parts the modules draw are made to look like part of the style, so they read their look off it. They follow the Styling module knobs that restyle what they borrow, live, whether the knob was set before the module was created or after, and across a setStyle:

What each module borrows

Module What it borrows The knobs it follows Your own look instead
PlacesModule, base-map marker type the POI labels and icons pois.labelColor, pois.labelOutlineColor, labels.sizeFactor, symbols.sizeFactor, pois.sizeFactor label, or a layers override
PlacesModule, circle-icon marker type the icon size symbols.sizeFactor, pois.sizeFactor a layers override
PlacesModule, pin-clustered marker type the micro markers symbols.sizeFactor, pois.sizeFactor a layers override
RoutingModule the delay colour of a traffic section traffic.incidents.minorColor, moderateColor, majorColor a line-color under layers.sections.traffic.routeIncidentBackgroundLine
TrafficIncidentDetailsModule the line colour of each incident magnitude traffic.incidents.minorColor, moderateColor, majorColor, closedColor none: the module always draws the style's incident colours
const places = await PlacesModule.create(map, { markerType: 'base-map' });
styling.set('pois.labelColor', '#be185d'); // the places' labels turn with the map's POIs

Who wins

A look of your own wins over the knob. With none of its knobs set, a route keeps the SDK's own delay colours, which match the incidents of the light styles. The pin marker type borrows nothing, and no knob reaches it. The knob still writes only the style's layers: the module reads the new look and redraws its own (Who owns what).

Related guides and examples

Related guides

Related examples