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 SectionsWithinOfType<T>

    A route's sections of one type within the spans asked about.

    type SectionsWithinOfType<T extends SectionType> = {
        lengthInMeters: number;
        sections: NonNullable<SectionsProps[T]>;
        shares: number[];
    }

    Type Parameters

    Index
    lengthInMeters: number

    How far they run within the spans, together.

    sections: NonNullable<SectionsProps[T]>

    The sections reaching into the spans, whole, in their order on the route.

    shares: number[]

    Each section's share within the spans, from 0 to 1, in the order of sections. Use it to count only that part of what a section carries, such as a traffic section's delay.