TomTom Maps for JavaScript
    Preparing search index...

    Variable defaultSectionTypesConst

    defaultSectionTypes: readonly [
        "carpool",
        "carTrain",
        "country",
        "ferry",
        "importantRoadStretch",
        "lowEmissionZone",
        "motorway",
        "pedestrian",
        "roadShields",
        "speedLimit",
        "toll",
        "tollRoad",
        "tollVignette",
        "traffic",
        "tunnel",
        "unpaved",
        "urban",
        "vehicleRestricted",
        "lanes",
    ] = ...

    The section types a route calculation returns when its request names none: every type the routing API returns, and lanes with guidance.

    A sectionTypes list replaces the default rather than adding to it. Spread this one to add to it, such as the curves, which the SDK finds only when a list names them.

    const routes = await calculateRoute({ locations, sectionTypes: [...defaultSectionTypes, 'curve', 'curvyStretch'] });