Class

MKRoute

A single route between a requested start and end point.

Overview

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 MKDirections.Response object contains the possible routes.

Topics

Getting the Route Geometry

var polyline: MKPolyline

The detailed route geometry.

var steps: [MKRoute.Step]

The array of steps that comprise the overall route.

class MKRoute.Step

One portion of an 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.

Relationships

Inherits From

Conforms To

See Also

Directions

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 MKDirections.Request

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

class MKDirections.Response

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

class MKDirections.ETAResponse

The travel-time information returned by Apple servers.

class MKRoute.Step

One portion of an overall route.