TomTom Maps for JavaScript
    Preparing search index...

    Type Alias TrafficSectionProps

    TrafficSectionProps: SectionProps & {
        categories: TrafficCategory[];
        delayInSeconds?: number;
        effectiveSpeedInKmh?: number;
        magnitudeOfDelay: DelayMagnitude;
        tec: TrafficIncidentTEC;
    }

    Route section affected by a traffic incident.

    Represents a portion of the route experiencing traffic delays due to congestion, accidents, construction, or other incidents.

    Type Declaration

    • categories: TrafficCategory[]

      Categories of the incident. Based on the 'tec' cause codes.

    • OptionaldelayInSeconds?: number

      Additional delay in seconds caused by this incident.

      Extra time compared to free-flow conditions. Present when delay can be calculated.

    • OptionaleffectiveSpeedInKmh?: number

      Actual average speed through this incident in km/h.

      Present when speed information is available. Lower speeds indicate worse congestion.

    • magnitudeOfDelay: DelayMagnitude

      Severity level of the delay caused by this incident.

    • tec: TrafficIncidentTEC

      TPEG2-TEC standardized incident information.

      Provides internationally standardized codes for traffic incident classification.

    const trafficSection: TrafficSectionProps = {
    id: 'traffic-1',
    startPointIndex: 50,
    endPointIndex: 75,
    simpleCategory: 'jam',
    magnitudeOfDelay: 'moderate',
    delayInSeconds: 420, // 7 minutes
    effectiveSpeedInKmh: 25,
    tec: { effectCode: 1, causes: [{ mainCauseCode: 101 }] }
    };