DirectionsRequest
The requested start and end points for a route, as well as the planned mode of transportation.
Declaration
interface DirectionsRequestOverview
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,
});