TriggeringConfigVariant
public struct TriggeringConfigVariant : Hashable, Equatable
Defines a variant for which a trigger should be generated.
The most vital part of the instance is the triggeringPoints property where TriggerType is the key, and TriggeringPoint is the value associated with that key.
For example, the following variant will be applicable for a trigger where the road is controlled access, for all countries, for comprehensive mode, only for roundabout instructions, and it has one triggering point (follow).
TriggeringConfigVariant(
roadTypes: [.controlledAccess],
regions: [.restOfTheWorld],
announcementModes: [.comprehensive],
instructionTypes: [.roundabout],
triggeringPoints: [
.follow: TriggeringPoint(
recommendedDistance: TriggeringDistances(
defaultDistance: Measurement.tt.kilometers(1000.0)
),
messageDuration: 2
)
]
)
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates triggering variant.
Throws
Error.emptyRoadTypesif roadTypes set is empty.Error.emptyRoadTypesif roadTypes set is empty.Error.emptyRegionsif regions set is empty.Error.emptyAnnoncementModesif announcementModes set is empty.Error.emptyTriggeringPointsif triggeringPoints set is empty.Error.invalidRecommendedDistanceif triggeringPoints set contains an element with recommended distance <= 0.Declaration
Swift
public init( roadTypes: Set<TriggeringRoadType>, regions: Set<TriggeringRegion>, announcementModes: Set<AnnouncementMode>, instructionTypes: Set<TriggeringInstructionType>, triggeringPoints: [TriggerType: TriggeringPoint] ) throwsParameters
roadTypesThe roads for which the config variant is applicable.
regionsThe regions for which the config variant is applicable.
announcementModesThe announcement modes for which the config variant is applicable.
instructionTypesThe instructions for which the config variant is applicable.
triggeringPointsTriggering points define where the trigger of this variant must be exposed.
-
The roads for which the config variant is applicable.
Declaration
Swift
public let roadTypes: Set<TriggeringRoadType> -
The regions for which the config variant is applicable.
Declaration
Swift
public let regions: Set<TriggeringRegion> -
The announcement modes for which the config variant is applicable.
Declaration
Swift
public let announcementModes: Set<AnnouncementMode> -
The instructions for which the config variant is applicable.
Declaration
Swift
public let instructionTypes: Set<TriggeringInstructionType> -
Triggering points define where the trigger of this variant must be exposed.
Declaration
Swift
public let triggeringPoints: [TriggerType : TriggeringPoint] -
Equality operator.
Declaration
Swift
public static func == (lhs: TriggeringConfigVariant, rhs: TriggeringConfigVariant) -> Bool -
Hashing function.
Declaration
Swift
public func hash(into hasher: inout Hasher)
TomTom SDK for iOS (0.53.1)
TriggeringConfigVariant