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, callback) method to get directions between two points, as shown in the code listing that follows. Direction requests require origin and destination.

const myDirections = new mapkit.Directions();
myDirections.route({
  origin: "San Francisco, CA",
  destination: "Oakland, CA",
  transportType: TransportType/Automobile },
  function(error, data) {
    // Results return asynchronously via this callback function, in `data`.
  }
);

Topics

Directions request

See Also

Getting directions