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 WaypointDrag

    One step of a drag, as RouteDraggingOptions.onWaypointsChange reports it.

    type WaypointDrag = {
        kind: WaypointDragKind;
        position: Position;
        type: DragEventType;
        waypointIndex: number;
    }
    Index
    position: Position

    Where the dragged waypoint is now, as [longitude, latitude].

    type: DragEventType

    'dragstart' once, 'drag' on every move, then 'dragend' where the waypoint is dropped.

    waypointIndex: number

    The dragged waypoint's index in the waypoints, null placeholders included. For an 'insert', the index the new waypoint was inserted at.