TomTom Maps for JavaScript
    Preparing search index...

    Type Alias Route<P>

    Route: Omit<Feature<LineString, P>, "id" | "bbox"> & { bbox: BBox; id: string }

    GeoJSON Feature representing a calculated route.

    The geometry is a LineString containing the route path coordinates. The properties contain all route information (summary, sections, guidance).

    Type Parameters

    Type Declaration

    • bbox: BBox

      Bounding box that contains the entire route or at least its waypoints.

    • id: string

      Unique identifier for this route.

      Randomly generated to distinguish between multiple route alternatives.

    const route: Route = {
    type: 'Feature',
    geometry: {
    type: 'LineString',
    coordinates: [[4.9, 52.3], [4.91, 52.31], ...]
    },
    properties: {
    id: 'route-123',
    summary: { lengthInMeters: 5000, travelTimeInSeconds: 300, ... },
    sections: { ... },
    index: 0
    }
    };