Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLNavigationInstruction

SDLNavigationInstruction Class Reference

Section Contents

Overview

A navigation instruction.

-initWithLocationDetails:action:

Convenience init for required parameters

Objective-C

- (nonnull instancetype)
    initWithLocationDetails:(nonnull SDLLocationDetails *)locationDetails
                     action:(nonnull SDLNavigationAction)action;

Swift

init(locationDetails: SDLLocationDetails, action: SDLNavigationAction)

Parameters

locationDetails

The location details

action

The navigation action

Return Value

A SDLNavigationInstruction object

-initWithLocationDetails:action:eta:bearing:junctionType:drivingSide:details:image:

Convenience init for all parameters.

Objective-C

- (nonnull instancetype)
    initWithLocationDetails:(nonnull SDLLocationDetails *)locationDetails
                     action:(nonnull SDLNavigationAction)action
                        eta:(nullable SDLDateTime *)eta
                    bearing:(UInt16)bearing
               junctionType:(nullable SDLNavigationJunction)junctionType
                drivingSide:(nullable SDLDirection)drivingSide
                    details:(nullable NSString *)details
                      image:(nullable SDLImage *)image;

Swift

convenience init(locationDetails: SDLLocationDetails, action: SDLNavigationAction, eta: SDLDateTime?, bearing: UInt16, junctionType: SDLNavigationJunction?, drivingSide: SDLDirection?, details: String?, image: SDLImage?)

Parameters

locationDetails

The location details

action

The navigation action

eta

The estimated time of arrival

bearing

The angle at which this instruction takes place

junctionType

The navigation junction type

drivingSide

Used to infer which side of the road this instruction takes place

details

This is a string representation of this instruction, used to display instructions to the users

image

An image representation of this instruction

Return Value

A SDLNavigationInstruction object

locationDetails

The location details.

SDLLocationDetails, Required

Objective-C

@property (nonatomic, strong) SDLLocationDetails *_Nonnull locationDetails;

Swift

var locationDetails: SDLLocationDetails { get set }

action

The navigation action.

SDLNavigationAction, Required

Objective-C

@property (nonatomic, strong) SDLNavigationAction _Nonnull action;

Swift

var action: SDLNavigationAction { get set }

eta

The estimated time of arrival.

SDLDateTime, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLDateTime *eta;

Swift

var eta: SDLDateTime? { get set }

bearing

The angle at which this instruction takes place. For example, 0 would mean straight, <=45 is bearing right, >= 135 is sharp right, between 45 and 135 is a regular right, and 180 is a U-Turn, etc.

Integer, Optional, minValue=“0” maxValue=“359”

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLInt> *bearing;

Swift

var bearing: (NSNumber & SDLInt)? { get set }

junctionType

The navigation junction type.

SDLNavigationJunction, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLNavigationJunction junctionType;

Swift

var junctionType: SDLNavigationJunction? { get set }

drivingSide

Used to infer which side of the road this instruction takes place. For a U-Turn (action=TURN, bearing=180) this will determine which direction the turn should take place.

SDLDirection, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLDirection drivingSide;

Swift

var drivingSide: SDLDirection? { get set }

details

This is a string representation of this instruction, used to display instructions to the users. This is not intended to be read aloud to the users, see the param prompt in NavigationServiceData for that.

String, Optional

Objective-C

@property (nonatomic, strong, nullable) NSString *details;

Swift

var details: String? { get set }

image

An image representation of this instruction.

SDLImage, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLImage *image;

Swift

var image: SDLImage? { get set }
View on GitHub.com
Previous Section Next Section