<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKit",
  "identifier" : "/documentation/MapKit/MKDirections",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKDirections"
  },
  "title" : "MKDirections"
}
-->

# MKDirections

A utility object that computes directions and travel-time information based on the route information you provide.

```
class MKDirections
```

## Overview

You use an `MKDirections` object to ask the Apple servers to provide walking or driving directions for a route, which you specify using an [`MKDirections.Request`](/documentation/MapKit/MKDirections/Request) object. After making a request, MapKit delivers the results asynchronously to the completion handler that you provide. You can also get the estimated travel time for the route.

Each `MKDirections` object handles a single request for directions, although you can cancel and restart that request as needed. You can create multiple instances of this class and process different route requests at the same time, but make requests only when you plan to present the corresponding route information to the user. Apps may receive an [`MKError.Code.loadingThrottled`](/documentation/MapKit/MKError/Code/loadingThrottled) error if the device makes too many requests in too short a time period.

## Topics

### Creating a directions object

[`init(request:)`](/documentation/MapKit/MKDirections/init(request:))

Creates and returns a directions object using the specified request.

[`MKDirections.Request`](/documentation/MapKit/MKDirections/Request)

The start and end points of a route, along with the planned mode of transportation.

[`MKDirections.RoutePreference`](/documentation/MapKit/MKDirections/RoutePreference)

Options that modify how the framework selects routes when calculating directions.

### Getting the directions

[`calculate(completionHandler:)`](/documentation/MapKit/MKDirections/calculate(completionHandler:))

Begins calculating the requested route information asynchronously.

[`MKDirections.DirectionsHandler`](/documentation/MapKit/MKDirections/DirectionsHandler)

The block to use for processing the requested route information.

[`MKDirections.Response`](/documentation/MapKit/MKDirections/Response)

The route information that Apple servers return in response to your request for directions.

### Getting the ETA

[`calculateETA(completionHandler:)`](/documentation/MapKit/MKDirections/calculateETA(completionHandler:))

Begins calculating the requested travel-time information asynchronously.

[`MKDirections.ETAHandler`](/documentation/MapKit/MKDirections/ETAHandler)

The block to use for processing travel-time information.

[`MKDirections.ETAResponse`](/documentation/MapKit/MKDirections/ETAResponse)

The travel-time information that Apple servers return.

### Managing the request

[`cancel()`](/documentation/MapKit/MKDirections/cancel())

Cancels a pending request.

[`isCalculating`](/documentation/MapKit/MKDirections/isCalculating)

A Boolean value that indicates whether a request is in process.



---

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)