TomTom Maps for JavaScript
    Preparing search index...

    Type Alias ClusterResult

    A single cluster of traffic incidents, as clusterIncidents and the sandbox's cluster(...) produce it.

    type ClusterResult = {
        centroid: [number, number];
        delaySamples: number[];
        diameterKm: number;
        id: string;
        memberIds: string[];
        peakDelayInSeconds: number;
        primaryCategory: string;
        primaryRoads: string[];
        size: number;
        totalDelayInSeconds: number;
        trend: ClusterTrend;
    }
    Index
    centroid: [number, number]

    Geographic centre of the cluster [lng, lat].

    delaySamples: number[]

    Rolling window of totalDelayInSeconds across the last 3 matched snapshots. Internal trend state threaded forward via the previous run, not display data.

    diameterKm: number

    Diagonal of the cluster's bounding box in km.

    id: string

    A stable identifier, reused across runs when member overlap >= 50%.

    memberIds: string[]

    Incident IDs belonging to this cluster.

    peakDelayInSeconds: number

    Maximum delayInSeconds among all members.

    primaryCategory: string

    Most-frequent incident category across members (e.g. "jam").

    primaryRoads: string[]

    Most-frequently referenced road numbers across members.

    size: number

    Number of member incidents.

    totalDelayInSeconds: number

    Sum of delayInSeconds across all members.

    Trend across the last 3 snapshots: new on a first sighting, steady until there are 3.