TomTom Maps for JavaScript
    Preparing search index...

    Type Alias MaxNumberOfAlternatives

    MaxNumberOfAlternatives: 0 | 1 | 2 | 3 | 4 | 5

    Maximum number of alternative routes to calculate.

    Alternative routes provide different options for traveling between the same origin and destination.

    • 0: Only calculate the best route (default)
    • 1-5: Calculate best route plus up to N alternatives

    More alternatives increase computation time but provide more route options.

    // Request up to 2 alternative routes
    const maxAlternatives: MaxNumberOfAlternatives = 2;
    0