TomTom Maps for JavaScript
    Preparing search index...

    Type Alias TrafficIncidentDetailsModuleConfig

    TrafficIncidentDetailsModuleConfig: MapModuleCommonConfig & {
        beforeLayerConfig?: BeforeLayerConfig;
        highlight?: false | IncidentHighlightConfig;
        layers?: TrafficIncidentDetailsLayersConfig;
        line?: IncidentLineConfig;
        visible?: boolean;
    }

    Configuration for TrafficIncidentDetailsModule.

    Type Declaration

    • OptionalbeforeLayerConfig?: BeforeLayerConfig

      The map-style layer to position incident layers before. 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 routing module and the flat area analytics layers use the same default.

    • Optionalhighlight?: false | IncidentHighlightConfig

      How the incidents TrafficIncidentDetailsModule.setFocus marks are drawn, and a hovered or clicked incident too.

      • Omitted (or undefined) - The SDK default highlight, an outline beneath the stripe (black on light map styles, white on dark) and a 1.6× width pop.
      • false - No highlight. setFocus(ids) still writes MapLibre feature-state.focused, and user events eventState, so you can drive your own styling (extra layers, sidebar overlays, …) off those states.
      • { outline?: { color? }, line?: { widthFactor? } } - Overrides individual fields of the default highlight.
    • Optionallayers?: TrafficIncidentDetailsLayersConfig

      MapLibre overrides for the incident lines and markers. A layer hidden through its entry's layout.visibility stays hidden while the module is shown.

    • Optionalline?: IncidentLineConfig

      The incident lines: every incident's outline and stripe.

    • Optionalvisible?: boolean

      Whether the incident layers are shown. Defaults to true. show() never flips this flag. If false, the module loads data but keeps layers hidden until you call setVisible(true).