---
title: MKDirections
framework: mapkit
role: symbol
role_heading: Class
path: mapkit/mkdirections
---

# MKDirections

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

## Declaration

```swift
class MKDirections
```

## Mentioned in

Enabling Maps capability in Xcode

## Overview

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 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 error if the device makes too many requests in too short a time period.

## Topics

### Creating a directions object

- [init(request:)](mapkit/mkdirections/init(request:).md)
- [MKDirections.Request](mapkit/mkdirections/request.md)
- [MKDirections.RoutePreference](mapkit/mkdirections/routepreference.md)

### Getting the directions

- [calculate(completionHandler:)](mapkit/mkdirections/calculate(completionhandler:).md)
- [MKDirections.DirectionsHandler](mapkit/mkdirections/directionshandler.md)
- [MKDirections.Response](mapkit/mkdirections/response.md)

### Getting the ETA

- [calculateETA(completionHandler:)](mapkit/mkdirections/calculateeta(completionhandler:).md)
- [MKDirections.ETAHandler](mapkit/mkdirections/etahandler.md)
- [MKDirections.ETAResponse](mapkit/mkdirections/etaresponse.md)

### Managing the request

- [cancel()](mapkit/mkdirections/cancel().md)
- [isCalculating](mapkit/mkdirections/iscalculating.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Directions

- [MKDirections.Request](mapkit/mkdirections/request.md)
- [MKDirections.Response](mapkit/mkdirections/response.md)
- [MKDirections.ETAResponse](mapkit/mkdirections/etaresponse.md)
- [MKRoute](mapkit/mkroute.md)
- [MKRoute.Step](mapkit/mkroute/step.md)
