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 CurveDetectionOptions

    The thresholds a route's curves and curvy stretches are found with.

    calculateRoute takes it as curveDetection, and withCurveSections to find them again on a route you already have.

    // Only the hard curves, and the stretches of five or more of them
    const curveDetection: CurveDetectionOptions = {
    curve: { maxRadiusInMeters: 100 },
    curvyStretch: { minCurveCount: 5 },
    };
    type CurveDetectionOptions = {
        curve?: CurveSectionsOptions;
        curvyStretch?: Omit<CurvyStretchSectionsOptions, "curves">;
    }
    Index

    The thresholds a stretch of road has to reach to count as a curve.

    curvyStretch?: Omit<CurvyStretchSectionsOptions, "curves">

    How close the curves found have to follow one another to make a curvy stretch.