GuidanceOptions
public struct GuidanceOptions
Specifies options related to generated instructions. It is used by RoutePlanningOptions
when planning a route.
-
init(guidanceVersion:
instructionType: language: roadShieldReferences: announcementPoints: phoneticsType: extendedSections: progressPoints: ) Creates a new
GuidanceOptions
instance with provided parameters.Note
The parameter announcementPoints is not supported with the Orbis map.Throws
An error of the typeGuidanceOptionError/unsupportedCombinationOfOptions(_:)
Declaration
Swift
@available(*, deprecated, message: "This API is deprecated and will be removed with the next major release. Please use the new initializer instead.") public init ( guidanceVersion: OnlineAPIVersion = .v1, instructionType: InstructionType = .text, language: Locale = Locale(identifier: "en-US"), roadShieldReferences: RoadShieldReferences = .none, announcementPoints: AnnouncementPoints = .none, phoneticsType: InstructionPhoneticsType = .none, extendedSections: ExtendedSections = .none, progressPoints: ProgressPoints = .none ) throws
Parameters
guidanceVersion
The version of the guidance API to be used. By default it is equal to the
OnlineAPIVersion/v1
value.instructionType
The format in which instructions are reported. By default it is equal to the
InstructionType/text
value.language
The language of instructions. By default it is equal to “en-US”.
roadShieldReferences
Whether to include references to road shields in instructions. By default it is equal to the
RoadShieldReferences/none
value.announcementPoints
Whether to include announcement points in instructions. By default it is equal to the
AnnouncementPoints/none
value.phoneticsType
The format of phonetic instruction transcriptions. By default it is equal to the
InstructionPhoneticsType/IPA
value.extendedSections
Whether to include road shield sections and lane sections in the
TomTomSDKRoute/Route/sections
.TomTomSDKRoute/RoadShieldSection
can be provided via this parameter even when no instructions are requested nor provided. By default it is equal to theExtendedSections/none
value.progressPoints
Whether to include distance and travel time points in the response. By default it is equal to the
ProgressPoints/all
value. -
Creates a new
GuidanceOptions
instance with provided parameters.Throws
An error of the typeGuidanceOptionError/unsupportedCombinationOfOptions(_:)
Declaration
Swift
public init ( language: Locale = Locale(identifier: "en-US"), roadShieldReferences: RoadShieldReferences = .none, phoneticsType: InstructionPhoneticsType = .IPA, extendedSections: ExtendedSections = .none ) throws
Parameters
language
The language of instructions. By default it is equal to “en-US”.
roadShieldReferences
Whether to include references to road shields in instructions. By default it is equal to the
RoadShieldReferences/none
value.phoneticsType
The format of phonetic instruction transcriptions. By default it is equal to the
InstructionPhoneticsType/IPA
value.extendedSections
Whether to include road shield sections and lane sections in the
TomTomSDKRoute/Route/sections
.TomTomSDKRoute/RoadShieldSection
can be provided via this parameter even when no instructions are requested nor provided. By default it is equal to theExtendedSections/none
value.
-
The format in which instructions are reported. By default it is equal to the
InstructionType/text
value.Declaration
Swift
@available(*, deprecated, message: "This API is deprecated and will be removed with the next major release.") public var instructionType: InstructionType
-
The locale that defines the language of instructions. e.g. “en-GB”. By default it is equal to “en-US”.
Declaration
Swift
public var language: Locale
-
Whether to include references to road shields in instructions. By default it is equal to the
RoadShieldReferences/none
value.Declaration
Swift
public var roadShieldReferences: RoadShieldReferences
-
Whether to include announcement points in instructions. By default it is equal to the
AnnouncementPoints/none
value.Note
This option is not supported with the Orbis map.Declaration
Swift
@available(*, deprecated, message: "This API is deprecated and will be removed with the next major release.") public var announcementPoints: AnnouncementPoints
-
The format of phonetic instruction transcriptions. By default it is equal to the
InstructionPhoneticsType/none
value.Declaration
Swift
public var phoneticsType: InstructionPhoneticsType
-
Whether to include road shield and lane sections in the
TomTomSDKRoute/Route/sections
. The returnedTomTomSDKRoute/RouteLeg/instructions
always contain RoadShield information (if available) independent of this parameter. By default it is equal to theExtendedSections/none
value.Declaration
Swift
public var extendedSections: ExtendedSections
-
Whether to include distance and travel time points in the response. By default it is equal to the
ProgressPoints/none
value.Declaration
Swift
@available(*, deprecated, message: "This API is deprecated and will be removed with the next major release.") public var progressPoints: ProgressPoints