This is the documentation of version 1.0.0-rc.2. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias Waypoint<T>

    A route waypoint, as a GeoJSON Feature.

    Waypoints define the route path. The route passes through them in the order you specify.

    Type Parameters

    • T extends Anything = Anything

      Additional custom properties beyond the standard waypoint properties

    Every waypoint creates a route leg and an arrival instruction.

    // Regular waypoint
    const waypoint: Waypoint = {
    type: 'Feature',
    geometry: { type: 'Point', coordinates: [4.9041, 52.3676] },
    properties: {}
    };

    // Waypoint with custom properties
    const namedWaypoint: Waypoint<{ name: string }> = {
    type: 'Feature',
    geometry: { type: 'Point', coordinates: [4.9041, 52.3676] },
    properties: { name: 'Amsterdam' }
    };