<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.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/Request",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "MapKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MKDirectionsRequest"
  },
  "title" : "MKDirections.Request"
}
-->

# MKDirections.Request

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

```
class Request
```

## Overview

You use an [`MKDirections.Request`](/documentation/MapKit/MKDirections/Request) object when requesting or providing directions. If your app provides directions, use this class to decode the URL that the Maps app sends to you. If you need to request directions from Apple, pass an instance of this class to an [`MKDirections`](/documentation/MapKit/MKDirections) object. For example, an app that provides subway directions might request walking directions to and from relevant subway stations.

Prior to iOS 14, for apps that provide directions, you receive direction-related URLs in your app delegate’s <doc://com.apple.documentation/documentation/UIKit/UIApplicationDelegate/application(_:open:options:)>method. Upon receiving a URL, call the [`isDirectionsRequest(_:)`](/documentation/MapKit/MKDirections/Request/isDirectionsRequest(_:)) method of this class to determine whether the URL relates to routing directions. If it does, create an instance of this class using the provided URL and extract the map items associated with the start and end points.

> Note:
> Prior to iOS 14, to provide routing directions, your app needs to include special keys in its `Info.plist` file and be able to handle URLs that the Maps app sends to it. These keys indicate a special URL type that you app needs to handle. For information about how to implement this support, see [Location and Maps Programming Guide](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009497).

## Topics

### Creating a directions request object

[`isDirectionsRequest(_:)`](/documentation/MapKit/MKDirections/Request/isDirectionsRequest(_:))

Returns a Boolean value that indicates whether the specified URL contains a directions request.

[`init(contentsOfURL:)`](/documentation/MapKit/MKDirections/Request/init(contentsOfURL:))

Creates and returns a directions request object using the specified URL.

### Accessing the start and end points

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

The starting point for routing directions.

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

The end point for routing directions.

### Specifying transportation options

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

The type of conveyance that the directions apply to.

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

The value that indicates whether the framework uses or avoids highways when providing directions.

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

The value that indicates whether the framework avoids routes that have tolls when providing directions.

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

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

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

A Boolean value that indicates whether your app requests multiple routes when they’re available.

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

The departure date for the trip.

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

The arrival date for the trip.

### Constants

[`MKDirectionsTransportType`](/documentation/MapKit/MKDirectionsTransportType)

Constants that specify the type of conveyance to use.

### Launch options

[`MKLaunchOptionsCameraKey`](/documentation/MapKit/MKLaunchOptionsCameraKey)

The virtual camera to use for viewing the map.

[`MKLaunchOptionsDirectionsModeCycling`](/documentation/MapKit/MKLaunchOptionsDirectionsModeCycling)

Cycling directions between the specified start and end points.

[`MKLaunchOptionsDirectionsModeDefault`](/documentation/MapKit/MKLaunchOptionsDirectionsModeDefault)

Directions that match the user’s preferred transportation type.

[`MKLaunchOptionsDirectionsModeDriving`](/documentation/MapKit/MKLaunchOptionsDirectionsModeDriving)

Driving directions between the specified start and end points.

[`MKLaunchOptionsDirectionsModeKey`](/documentation/MapKit/MKLaunchOptionsDirectionsModeKey)

The mode of transportation.

[`MKLaunchOptionsDirectionsModeTransit`](/documentation/MapKit/MKLaunchOptionsDirectionsModeTransit)

Public transit directions between the specified start and end points.

[`MKLaunchOptionsDirectionsModeWalking`](/documentation/MapKit/MKLaunchOptionsDirectionsModeWalking)

Walking directions between the specified start and end points.

[`MKLaunchOptionsMapCenterKey`](/documentation/MapKit/MKLaunchOptionsMapCenterKey)

The coordinate value on which to center the map.

[`MKLaunchOptionsMapSpanKey`](/documentation/MapKit/MKLaunchOptionsMapSpanKey)

The amount of the map to display.

[`MKLaunchOptionsMapTypeKey`](/documentation/MapKit/MKLaunchOptionsMapTypeKey)

The type of map (standard, satellite, or hybrid) to display.

[`MKLaunchOptionsShowsTrafficKey`](/documentation/MapKit/MKLaunchOptionsShowsTrafficKey)

A Boolean value that indicates whether to display traffic information.



---

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)