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

# MKDirections.Request

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

## Declaration

```swift
class Request
```

## Overview

Overview You use an 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 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 application(_:open:options:)method. Upon receiving a URL, call the 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.

## Topics

### Creating a directions request object

- [isDirectionsRequest(_:)](mapkit/mkdirections/request/isdirectionsrequest(_:).md)
- [init(contentsOfURL:)](mapkit/mkdirections/request/init(contentsofurl:).md)

### Accessing the start and end points

- [source](mapkit/mkdirections/request/source.md)
- [destination](mapkit/mkdirections/request/destination.md)

### Specifying transportation options

- [transportType](mapkit/mkdirections/request/transporttype.md)
- [highwayPreference](mapkit/mkdirections/request/highwaypreference.md)
- [tollPreference](mapkit/mkdirections/request/tollpreference.md)
- [MKDirections.RoutePreference](mapkit/mkdirections/routepreference.md)
- [requestsAlternateRoutes](mapkit/mkdirections/request/requestsalternateroutes.md)
- [departureDate](mapkit/mkdirections/request/departuredate.md)
- [arrivalDate](mapkit/mkdirections/request/arrivaldate.md)

### Constants

- [MKDirectionsTransportType](mapkit/mkdirectionstransporttype.md)

### Launch options

- [MKLaunchOptionsCameraKey](mapkit/mklaunchoptionscamerakey.md)
- [MKLaunchOptionsDirectionsModeCycling](mapkit/mklaunchoptionsdirectionsmodecycling.md)
- [MKLaunchOptionsDirectionsModeDefault](mapkit/mklaunchoptionsdirectionsmodedefault.md)
- [MKLaunchOptionsDirectionsModeDriving](mapkit/mklaunchoptionsdirectionsmodedriving.md)
- [MKLaunchOptionsDirectionsModeKey](mapkit/mklaunchoptionsdirectionsmodekey.md)
- [MKLaunchOptionsDirectionsModeTransit](mapkit/mklaunchoptionsdirectionsmodetransit.md)
- [MKLaunchOptionsDirectionsModeWalking](mapkit/mklaunchoptionsdirectionsmodewalking.md)
- [MKLaunchOptionsMapCenterKey](mapkit/mklaunchoptionsmapcenterkey.md)
- [MKLaunchOptionsMapSpanKey](mapkit/mklaunchoptionsmapspankey.md)
- [MKLaunchOptionsMapTypeKey](mapkit/mklaunchoptionsmaptypekey.md)
- [MKLaunchOptionsShowsTrafficKey](mapkit/mklaunchoptionsshowstraffickey.md)

### Initializers

- [init(contentsOf:)](mapkit/mkdirections/request/init(contentsof:).md)

### Default Implementations

- [Request Implementations](mapkit/mkdirections/request/request-implementations.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](mapkit/mkdirections.md)
- [MKDirections.Response](mapkit/mkdirections/response.md)
- [MKDirections.ETAResponse](mapkit/mkdirections/etaresponse.md)
- [MKRoute](mapkit/mkroute.md)
- [MKRoute.Step](mapkit/mkroute/step.md)
