<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/Directions",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "cl/mapkit.Directions"
  },
  "title" : "Directions"
}
-->

# Directions

An object that provides directions and estimated travel time based on the options you provide.

```
class Directions extends Service
```

## Topics

### Creating a directions object

[`constructor(options?: DirectionsConstructorOptions);`](/documentation/MapKitJS/Directions/DirectionsConstructor)

Creates a directions object with options you provide.

[`interface DirectionsConstructorOptions`](/documentation/MapKitJS/DirectionsConstructorOptions)

Options that you may provide when creating a directions object.

### Getting estimated arrival times

[`eta(request: EtaRequestOptions): Promise<EtaResponse>;`](/documentation/MapKitJS/Directions/eta)

Retrieves estimated arrival times to up to 10 destinations from a single starting point.

[`interface EtaRequestOptions`](/documentation/MapKitJS/EtaRequestOptions)

The options you may provide for requesting estimated arrival times.

[`interface EtaResponse`](/documentation/MapKitJS/EtaResponse)

The estimated arrival times for a set of destinations.

[`interface EtaResult`](/documentation/MapKitJS/EtaResult)

The mode of transportation, distance, and travel time estimates for a single destination.

### Getting directions

[`route(request: DirectionsRequest): Promise<DirectionsResponse>;`](/documentation/MapKitJS/Directions/route)

Retrieves directions and estimated travel time based on the specified start and end points.

[`interface DirectionsRequest`](/documentation/MapKitJS/DirectionsRequest)

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

[`interface DirectionsResponse`](/documentation/MapKitJS/DirectionsResponse)

The directions and estimated travel time for a route.

[`class Route`](/documentation/MapKitJS/Route)

Information about a route, including step-by-step instructions, distance, and estimated travel time.

[`class RouteStep`](/documentation/MapKitJS/RouteStep)

A single step of the route between the requested start and end points.

### Canceling a directions request

[`cancel(promise: Promise<unknown>): boolean;`](/documentation/MapKitJS/Service/cancel)

Cancels a request using the provided request promise.

### Deprecated

[`route(
    request: DirectionsRequest,
    callback: (
        error: Error | null,
        result: DirectionsResponse | null,
    ) => void,
): Promise<DirectionsResponse>;`](/documentation/MapKitJS/Directions/route1)

Retrieves directions and estimated travel time based on the specified start and end points.

[`eta(
    request: EtaRequestOptions,
    callback: (error: Error | null, result: EtaResponse | null) => void,
): Promise<EtaResponse>;`](/documentation/MapKitJS/Directions/eta1)

Retrieves estimated arrival times to up to 10 destinations from a single starting point.

[`static get Transport(): typeof TransportType;`](/documentation/MapKitJS/Directions/Transport)

A static property that refers to an object that describes the available transport type values.

## Relationships

### Inherits From

[`Service`](/documentation/MapKitJS/Service)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)