A single route between a requested start and end point.


An MKRoute object defines the geometry for the route—that is, it contains line segments associated with specific map coordinates. A route object may also include other information, such as the name of the route, its distance, and the expected travel time.

You do not create instances of this class directly. When you use an MKDirections object to request directions from Apple, the returned MKDirectionsResponse object contains the possible routes.


Getting the Route Geometry

var polyline: MKPolyline

The detailed route geometry.

var steps: [MKRouteStep]

The array of steps that comprise the overall route.

Getting Additional Route Details

var name: String

The name assigned to the route.

var advisoryNotices: [String]

An array of advisory notice strings for the route.

var distance: CLLocationDistance

The route distance in meters.

var expectedTravelTime: TimeInterval

The expected travel time in seconds.

var transportType: MKDirectionsTransportType

The overall route transport type.


Inherits From

Conforms To

See Also


class MKMapItem

A point of interest on the map.

class MKDirections

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

class MKDirectionsRequest

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

class MKDirectionsResponse

The route information returned by Apple servers in response to one of your requests for directions.

class MKETAResponse

The travel-time information returned by Apple servers.

class MKRouteStep

One portion of an overall route.