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 InputSectionTypes

    InputSectionTypes: readonly InputSectionType[]

    Array of section types to include in the route response.

    Sections divide the route into portions with specific characteristics, so you can display additional context like toll roads, ferry crossings or traffic incidents.

    Available section types:

    • carTrain: Sections requiring car train transport
    • ferry: Water crossings requiring ferry
    • tunnel: Underground tunnel sections
    • motorway: Highway/freeway sections
    • pedestrian: Pedestrian-only sections
    • toll: Sections requiring toll payment
    • tollRoad: Toll roads
    • tollVignette: Sections requiring toll vignette
    • country: Different countries traversed
    • traffic: Sections with traffic incidents
    • vehicleRestricted: Sections with vehicle restrictions
    • carpool: HOV/carpool lane sections
    • urban: Urban area sections
    • unpaved: Unpaved road sections
    • lowEmissionZone: Low emission zones
    • speedLimit: Speed limit changes
    • roadShields: Road shield information
    • importantRoadStretch: Named important road stretches along the route
    • lanes: Lane guidance
    • curve: Curves, with their heading change and radius, which the SDK finds in the route's geometry
    • curvyStretch: Stretches where curves follow one another closely, which the SDK groups the curves into

    A requested section type is only present in the response if the route actually traverses it (e.g. ferry is omitted on a route with no water crossing). The lanes section is returned only when guidance is also requested, and, when a list is given, only if it includes lanes.

    // Request toll, ferry, and traffic sections
    const sectionTypes: InputSectionTypes = ['toll', 'ferry', 'traffic'];

    // The default sections, and the curves
    const sectionTypes: InputSectionTypes = [...defaultSectionTypes, 'curve', 'curvyStretch'];

    // Request no optional sections (leg sections still included)
    const sectionTypes: InputSectionTypes = [];

    When omitted, core's defaultSectionTypes: every type but curve and curvyStretch.