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 WaypointLike

    WaypointLike: Waypoint | HasLngLat

    A waypoint location, in one of these forms:

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

    Waypoints are single points by default. To carry properties of your own alongside the position, use the full Waypoint Feature format.

    // 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' }
    };