Initializer

init(request:)

Initializes and returns a directions object using the specified request.

Declaration

init(request: MKDirections.Request)

Parameters

request

The request object containing the start and end points of the route. This parameter must not be nil.

Return Value

An initialized directions object.

Discussion

After initializing your directions object, you must call the calculate(completionHandler:) or calculateETA(completionHandler:) method to perform the request.

See Also

Creating a Directions Object

class MKDirections.Request

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