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.

    SectionsProps describes each section type.

    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.