Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLNavigationServiceData Class Reference

Section Contents

Overview

Undocumented

-initWithTimestamp:

Convenience init for required parameters.

Objective-C

- (nonnull instancetype)initWithTimestamp:(nonnull SDLDateTime *)timestamp;

Swift

init(timestamp: SDLDateTime)

Parameters

timestamp

Timestamp of when the data was generated

Return Value

A SDLNavigationServiceData object

-initWithTimestamp:origin:destination:destinationETA:instructions:nextInstructionETA:nextInstructionDistance:nextInstructionDistanceScale:prompt:

Convenience init for all parameters.

Objective-C

- (nonnull instancetype)
               initWithTimestamp:(nonnull SDLDateTime *)timestamp
                          origin:(nullable SDLLocationDetails *)origin
                     destination:(nullable SDLLocationDetails *)destination
                  destinationETA:(nullable SDLDateTime *)destinationETA
                    instructions:
                        (nullable NSArray<SDLNavigationInstruction *> *)
                            instructions
              nextInstructionETA:(nullable SDLDateTime *)nextInstructionETA
         nextInstructionDistance:(float)nextInstructionDistance
    nextInstructionDistanceScale:(float)nextInstructionDistanceScale
                          prompt:(nullable NSString *)prompt;

Swift

convenience init(timestamp: SDLDateTime, origin: SDLLocationDetails?, destination: SDLLocationDetails?, destinationETA: SDLDateTime?, instructions: [SDLNavigationInstruction]?, nextInstructionETA: SDLDateTime?, nextInstructionDistance: Float, nextInstructionDistanceScale: Float, prompt: String?)

Parameters

timestamp

Timestamp of when the data was generated

origin

The start location

destination

The final destination location

destinationETA

The estimated time of arrival at the final destination location

instructions

Array ordered with all remaining instructions

nextInstructionETA

The estimated time of arrival at the next destination

nextInstructionDistance

The distance to this instruction from current location

nextInstructionDistanceScale

Distance till next maneuver (starting from) from previous maneuver

prompt

This is a prompt message that should be conveyed to the user through either display or voice (TTS)

Return Value

A SDLNavigationServiceData object

timestamp

This is the timestamp of when the data was generated. This is to ensure any time or distance given in the data can accurately be adjusted if necessary.

SDLDateTime, Required

Objective-C

@property (readwrite, strong, nonatomic) SDLDateTime *_Nonnull timestamp;

Swift

var timestamp: SDLDateTime { get set }

origin

The start location.

SDLLocationDetails, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) SDLLocationDetails *origin;

Swift

var origin: SDLLocationDetails? { get set }

destination

The final destination location.

SDLLocationDetails, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    SDLLocationDetails *destination;

Swift

var destination: SDLLocationDetails? { get set }

destinationETA

The estimated time of arrival at the final destination location.

SDLDateTime, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) SDLDateTime *destinationETA;

Swift

var destinationETA: SDLDateTime? { get set }

instructions

This array should be ordered with all remaining instructions. The start of this array should always contain the next instruction.

Array of SDLNavigationInstruction, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSArray<SDLNavigationInstruction *> *instructions;

Swift

var instructions: [SDLNavigationInstruction]? { get set }

nextInstructionETA

The estimated time of arrival at the next destination.

SDLDateTime, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    SDLDateTime *nextInstructionETA;

Swift

var nextInstructionETA: SDLDateTime? { get set }

nextInstructionDistance

The distance to this instruction from current location. This should only be updated ever .1 unit of distance. For more accuracy the consumer can use the GPS location of itself and the next instruction.

Float, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLFloat> *nextInstructionDistance;

Swift

var nextInstructionDistance: (NSNumber & SDLFloat)? { get set }

nextInstructionDistanceScale

Distance till next maneuver (starting from) from previous maneuver.

Float, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLFloat> *nextInstructionDistanceScale;

Swift

var nextInstructionDistanceScale: (NSNumber & SDLFloat)? { get set }

prompt

This is a prompt message that should be conveyed to the user through either display or voice (TTS). This param will change often as it should represent the following: approaching instruction, post instruction, alerts that affect the current navigation session, etc.

String, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSString *prompt;

Swift

var prompt: String? { get set }
View on GitHub.com
Previous Section Next Section