Contents

DirectionsRequest

The requested start and end points for a route, as well as the planned mode of transportation.

Declaration

interface DirectionsRequest

Overview

Provide a DirectionsRequest object to the route(request) method to get directions between two points. You must provide origin and destination.

const myDirections = new mapkit.Directions();
const data = await myDirections.route({
    origin: "San Francisco, CA",
    destination: "Oakland, CA",
    transportType: mapkit.Directions.Transport.Automobile,
});

Topics

Directions request

See Also

Getting directions