This is the documentation of version 1.0.0-rc.4. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias IncidentHighlightConfig

    How a focused, hovered or clicked incident is drawn, meaning the subset TrafficIncidentDetailsModule.setFocus marks and an incident with an eventState, and how the incidents outside that focus fade.

    type IncidentHighlightConfig = {
        line?: { widthFactor?: number };
        outline?: { color?: string };
        unfocusedOpacityFactor?: number;
    }
    Index
    line?: { widthFactor?: number }

    The highlighted stripe.

    Type Declaration

    • OptionalwidthFactor?: number

      Multiplier on the stripe's width, clamped to its range in trafficIncidentDetailsKnobCatalogue (1–1.8). A value that is not a finite number falls back to the default. 1 disables the width pop while keeping the outline.

      1.6

    outline?: { color?: string }

    The outline painted beneath the highlighted stripe.

    Type Declaration

    • Optionalcolor?: string

      The outline's colour.

      #000 on light map styles, #FFF on dark styles

    unfocusedOpacityFactor?: number

    Multiplier on the opacity of the incidents outside the focus set while a focus is active, so the focused ones stand out. It fades their lines, icons and delay text, multiplying IncidentLineConfig.opacity, and survives a style change.

    Clamped to its range in trafficIncidentDetailsKnobCatalogue (0–1). A value that is not a finite number falls back to the default. A hovered or clicked incident draws at full strength, and so does every incident with no focus set.

    1