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

    Type Alias TrafficIncidentsModuleConfig

    TrafficIncidentsModuleConfig: MapModuleCommonConfig & {
        colors?: TrafficIncidentColors;
        filters?: TrafficIncidentsFilters;
        icons?: IncidentIconsConfig;
        visible?: boolean;
        widthFactor?: number;
    }

    Configuration for traffic incidents module.

    Type Declaration

    • Optionalcolors?: TrafficIncidentColors

      The colours of the incident lines, per delay magnitude.

    • Optionalfilters?: TrafficIncidentsFilters

      Which incidents are shown, by category, severity, delay and road type — lines and icons alike.

    • Optionalicons?: IncidentIconsConfig

      Configuration specific to the incident icons.

    • Optionalvisible?: boolean

      Controls the visibility of the traffic incident layers, icons included.

      false
      
    • OptionalwidthFactor?: number

      Width multiplier for the incident lines, 1 being the style's own.

      1
      

    One set of filters narrows both the incident lines and their icons; icons only decides whether the icons are shown.