ManeuverNotificationOptions
public struct ManeuverNotificationOptions : Hashable
A struct containing all options to be used when generating maneuver notifications.
-
The language in which the notifications will be generated. When the specified language is not supported, the default language is used, which is English (American).
Declaration
Swift
public var language: LanguageCode -
Defines the measurement system used for distances. Defaults to metric.
Declaration
Swift
public var unitSystem: UnitSystem -
List of
ManeuverNotificationTypefor which notifications should be generated. Excluding all of them will disable the maneuver notifications completely. By default, all types are included.Declaration
Swift
public var includedNotificationTypes: [ManeuverNotificationType] -
A flag that indicates whether notification for roundabout-related maneuvers should be generated. Defaults to
true.Declaration
Swift
public var enableRoundaboutNotification: Bool -
A flag that indicates whether notification for destination/stopover reached maneuvers should be generated. Defaults to
true.Declaration
Swift
public var enableDestinationReachedNotification: Bool -
A flag that indicates whether combined maneuver notifications should be generated. Such double notifications can be useful when maneuvers are very close. Example: A combined message: ‘After 300 meters turn left and then turn right.’. This way a user can better anticipate the next-next maneuver. Note that setting to
truewill make the notification longer as two maneuvers will be merged into one. When the next-next maneuver action takes place, the notification will be given as usual. Example: ‘Now turn left and then then turn right.’ will be followed by ‘Now turn right.’. Defaults totrue.Declaration
Swift
public var enableDoubleNotification: Bool -
A flag that indicates whether phonemes in selected notification format for proper nouns (e.g. road names, road numbers, city names) should be used when generating notifications. Direction information comes usually in orthographic form and phoneme (e.g. Wall Street and “wɔːl"striːt). However, when the notification is synthesized by a TTS engine, the pronunciation of the orthographic form solely depends on its capability and phoneme set. The use of our phoneme data in the notification usually makes the pronunciation of direction information sound more natural. Note: For now, this property is functional for road name and road number information only. Moreover, the native
AVSpeechSynthesizerfor iOS does not support phonemes as of now. Other 3rd party TTS engines may support it. Defaults tofalse.Declaration
Swift
public var enablePhoneme: Bool -
A formatting option for the phoneme that is included in the notification. By default, no phoneme is used and the
NotificationFormatOption.plainorthographic form is included in the notification.Note: To use the SSML format for phonemes,
ManeuverNotificationOptions.enablePhonemeneeds to be set totrue. Moreover, the SSML format is not supported by the nativeAVSpeechSynthesizerfor iOS, as of now. Other 3rd party TTS engines may support it.Declaration
Swift
public var notificationFormatOption: NotificationFormatOption -
An option whether street name, road number and sign post direction should be used when generating notification. Defaults to each attribute as
LocalizedTextPreference.useAlways.Declaration
Swift
public var textUsageOptions: TextUsageOptions -
A flag that indicates whether highway exit information should be used when generating notification. Defaults to
true.Declaration
Swift
public var enableHighwayExit: Bool -
A flag that indicates whether lane recommendation should be used when generating notifications. In case the flag is enabled, only the notification for the
ManeuverNotificationType.distancemaneuver notification type will contain the lane recommendation. The lane recommandation will replace the direction information in the notification. Example: ‘After 250 meters use the right two lanes and turn right.’. Defaults tofalse.Declaration
Swift
public var enableLaneRecommendation: Bool -
List of
NaturalGuidanceTypeshould be included in the notifications. Excluding all of them will disable natural guidance information in the notifications completely.By default, the list is empty and natural guidance is disabled.
Declaration
Swift
public var includedNaturalGuidanceTypes: [NaturalGuidanceType] -
An option whether direction information should be used when generating notification with
ManeuverNotificationType.action. Defaults toDirectionInformationUsageOption.none.Declaration
Swift
public var directionInformationUsageForActionNotificationOption: DirectionInformationUsageOption -
Creates a new instance of this class with default configurations.
Declaration
Swift
public init() -
Creates a new instance of this class with specified language and unit system.
Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.23.0. Use the default constructor instead.") public init(language: LanguageCode, unitSystem: UnitSystem) -
init(language:unitSystem: includedNotificationTypes: enableRoundaboutNotification: enableDestinationReachedNotification: enableDoubleNotification: enablePhoneme: textUsageOptions: enableHighwayExit: ) Creates a new instance of this class with full specified configurations.
Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.23.0. Use the default constructor instead.") public init(language: LanguageCode, unitSystem: UnitSystem, includedNotificationTypes: [ManeuverNotificationType], enableRoundaboutNotification: Bool, enableDestinationReachedNotification: Bool, enableDoubleNotification: Bool, enablePhoneme: Bool, textUsageOptions: TextUsageOptions, enableHighwayExit: Bool) -
init(language:unitSystem: includedNotificationTypes: enableRoundaboutNotification: enableDestinationReachedNotification: enableDoubleNotification: enablePhoneme: enableHighwayExit: ) Creates a new instance of this class with full specified configurations.
Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.23.0. Use the default constructor instead.") public init(language: LanguageCode, unitSystem: UnitSystem, includedNotificationTypes: [ManeuverNotificationType], enableRoundaboutNotification: Bool, enableDestinationReachedNotification: Bool, enableDoubleNotification: Bool, enablePhoneme: Bool, enableHighwayExit: Bool) -
init(language:unitSystem: includedNotificationTypes: enableRoundaboutNotification: enableDestinationReachedNotification: enableDoubleNotification: enablePhoneme: notificationFormatOption: enableHighwayExit: ) Creates a new instance of this class with full specified configurations.
Parameters
- language: The language in which the notifications will be generated. When the specified language is not supported, the default language is used, which is English (American).
- unitSystem: Defines the measurement system used for distances. Defaults to metric.
- includedNotificationTypes: List of
ManeuverNotificationTypefor which notifications should be generated. Excluding all of them will disable the maneuver notifications completely. By default, all types are included. - enableRoundaboutNotification: A flag that indicates whether notification for roundabout-related maneuvers should be generated.
Defaults to
true. - enableDestinationReachedNotification: A flag that indicates whether notification for destination/stopover reached maneuvers should be generated.
Defaults to
true. - enableDoubleNotification: A flag that indicates whether combined maneuver notifications should be generated.
Such double notifications can be useful when maneuvers are very close.
Example: A combined message: ‘After 300 meters turn left and then turn right.’.
This way a user can better anticipate the next-next maneuver.
Note that setting to
truewill make the notification longer as two maneuvers will be merged into one. When the next-next maneuver action takes place, the notification will be given as usual. Example: ‘Now turn left and then then turn right.’ will be followed by ‘Now turn right.’. Defaults totrue. - enablePhoneme: A flag that indicates whether phonemes in selected notification format for proper nouns (e.g. road names,
road numbers, city names) should be used when generating notifications. Direction information comes usually
in orthographic form and phoneme (e.g. Wall Street and “wɔːl"striːt). However, when the notification is
synthesized by a TTS engine, the pronunciation of the orthographic form solely depends on its capability
and phoneme set. The use of our phoneme data in the notification usually makes the pronunciation of
direction information sound more natural.
Note: For now, this property is functional for road name and road number information only.
Moreover, the native
AVSpeechSynthesizerfor iOS does not support phonemes as of now. Other 3rd party TTS engines may support it. Defaults tofalse. - notificationFormatOption: A formatting option for the phoneme that is included in the notification. By default, no phoneme is used
and the
NotificationFormatOption.plainorthographic form is included in the notification.
Note: To use the SSML format for phonemes,
ManeuverNotificationOptions.enablePhonemeneeds to be set totrue. Moreover, the SSML format is not supported by the nativeAVSpeechSynthesizerfor iOS, as of now. Other 3rd party TTS engines may support it.- enableHighwayExit: A flag that indicates whether highway exit information should be used when generating notification.
Defaults to
true.
Declaration
Swift
@available(*, deprecated, message: "Will be removed in v4.23.0. Use the default constructor instead.") public init(language: LanguageCode, unitSystem: UnitSystem, includedNotificationTypes: [ManeuverNotificationType], enableRoundaboutNotification: Bool, enableDestinationReachedNotification: Bool, enableDoubleNotification: Bool, enablePhoneme: Bool, notificationFormatOption: NotificationFormatOption, enableHighwayExit: Bool)