MKRouteStep Class Reference

Inherits from
Conforms to
Availability
Available in iOS 7.0 and later.
Declared in
MKDirectionsResponse.h

Overview

An MKRouteStep object represents one part of an overall route. Each step in a route corresponds to a single instruction that would need to be followed by the user. For example, a step might involve following a single road until a turn is required.

You do not create instances of this class directly. Instead, you receive route steps as part of an overall MKRoute object when you request directions from the Maps app. For more information about requesting directions, see MKDirections Class Reference.

Tasks

Getting the Step Geometry

Getting Additional Step Details

Properties

distance

The step distance in meters. (read-only)

@property (nonatomic, readonly) CLLocationDistance distance
Discussion

This property reflects the distance that the user covers while traversing the path of the step. It is not a direct distance between the start and end points of the step.

Availability
  • Available in iOS 7.0 and later.
Declared In
MKDirectionsResponse.h

instructions

The written instructions for following the path represented by this step. (read-only)

@property (nonatomic, readonly) NSString *instructions
Discussion

The string in this property is localized according to the user’s language preferences. You can present this string to the user from your app’s interface.

Availability
  • Available in iOS 7.0 and later.
Declared In
MKDirectionsResponse.h

notice

Additional notices that apply to the step. (read-only)

@property (nonatomic, readonly) NSString *notice
Discussion

Notices may include legal information or warning notices that apply to the step. For example, if the step crosses railroad tracks, it might contain a notice that warns the user not to cross the tracks when the lights are flashing.

Availability
  • Available in iOS 7.0 and later.
Declared In
MKDirectionsResponse.h

polyline

The detailed step geometry. (read-only)

@property (nonatomic, readonly) MKPolyline *polyline
Discussion

The polyline object in this property contains the geometry for this step. You can use the polyline object as an overlay in a map view.

Availability
  • Available in iOS 7.0 and later.
Declared In
MKDirectionsResponse.h

transportType

The transport type of the step. (read-only)

@property (nonatomic, readonly) MKDirectionsTransportType transportType
Discussion

This property reflects the transport type employed by the step and may differ from the transport type of the overall route.

Availability
  • Available in iOS 7.0 and later.
Declared In
MKDirectionsResponse.h