TomTom Maps for JavaScript
    Preparing search index...

    Type Alias TrafficIncidentOverlayConfig

    TrafficIncidentOverlayConfig: MapModuleCommonConfig & {
        beforeLayerConfig?: BeforeLayerConfig;
        focus?: false | IncidentFocusStyle;
        visible?: boolean;
    }

    Configuration for TrafficIncidentOverlayModule.

    Type Declaration

    • OptionalbeforeLayerConfig?: BeforeLayerConfig

      Position incident layers before this map-style layer. Pass 'top' to pin them above every other layer. Defaults to 'lowestLabel', which keeps incidents below map labels (roads, places, POIs) so labels stay readable — the same default the routing, analytics, and geometries modules use.

    • Optionalfocus?: false | IncidentFocusStyle

      Visual treatment for TrafficIncidentOverlayModule.setFocus.

      • Omit (or undefined) — use the SDK default treatment: a black outline beneath the focused stripe and a 1.6× width pop.
      • false — disable the visual treatment. setFocus(ids) still writes MapLibre feature-state.focused, so callers can drive their own styling (extra layers, sidebar overlays, …) off that state.
      • { outlineColor?, widthScale? } — override individual fields of the default treatment.
    • Optionalvisible?: boolean

      Initial visibility of all incident layers. Defaults to true. show() never flips this flag — if false, the module loads data but keeps layers hidden until setVisible(true) is called.