Contents

MKDirections.Request

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

Declaration

class Request

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.

Topics

Creating a directions request object

Accessing the start and end points

Specifying transportation options

Constants

Launch options

Initializers

Default Implementations

See Also

Directions