TomTom Maps for JavaScript
    Preparing search index...

    Type Alias WaypointLike

    WaypointLike: Waypoint | HasLngLat

    Flexible input type for specifying a waypoint location.

    Accepts various formats for convenience:

    • Full Waypoint Feature (for waypoints carrying custom properties)
    • Any object with coordinates (Position array, Point geometry, or Feature)

    Waypoints are single points by default. Use the full Waypoint Feature format to carry properties of your own alongside the position.

    // As coordinate array
    const wp1: WaypointLike = [4.9041, 52.3676];

    // As Point geometry
    const wp2: WaypointLike = { type: 'Point', coordinates: [4.9041, 52.3676] };

    // As full Waypoint Feature carrying custom properties
    const wp3: WaypointLike = {
    type: 'Feature',
    geometry: { type: 'Point', coordinates: [4.9041, 52.3676] },
    properties: { name: 'Amsterdam' }
    };