ManeuverNotificationTimingOptions
public struct ManeuverNotificationTimingOptions : Hashable
A struct defining timing and distance thresholds for maneuver notifications.
Setting custom values will impact the time when the notification for each supported ManeuverNotificationType is sent - dependent on the TimingProfile.
Note: By default, notification thresholds depend on TimingProfile. When custom values are set, then these rules will still apply.
The following rules apply for all transport modes:
- For
TimingProfile.fastSpeedtiming profile, if the current speed limit is less than 62 m/h (100 km/h), then the notification thresholds forTimingProfile.regularSpeedtiming profile will be used instead. - For
TimingProfile.regularSpeedtiming profile, if the current speed limit is less than 37 m/h (60 km/h), then the notification thresholds forTimingProfile.slowSpeedtiming profile will be used instead. - For
TimingProfile.slowSpeedtiming profile the thresholds will be always used as specified.
The timings follow a strict order:
ManeuverNotificationType.range: The first notification, it may be very far away (use 0 for farthest or earliest possible notification).ManeuverNotificationType.reminder: The second notification.ManeuverNotificationType.distance: A second reminder notification to take action.ManeuverNotificationType.action: Final notification, specifying the required action to be taken.
Therefore, it is crucial that the set values do not violate the order: range > reminder > distance > action.
For example, the following values are valid: range = 4000, reminder = 2500, distance = 1000, action = 400.
If ManeuverNotificationTimingOptions.rangeNotificationDistanceInMeters is smaller than ManeuverNotificationTimingOptions.reminderNotificationDistanceInMeters the new options will be
silently ignored and the previous values are kept.
You always have the choice to specify the thresholds for time or distance. For each ManeuverNotificationType a
notification is only sent once, so the value that is reached first, wins. However, it is recommended to always update both, time
and distance values.
A configuration value of 0 is only allowed for ManeuverNotificationTimingOptions.rangeNotificationDistanceInMeters and ManeuverNotificationTimingOptions.rangeNotificationTimeInSeconds.
It means that the maneuver notifications of type ManeuverNotificationType.range should be generated as soon
as the maneuver location is known - no matter how far away it may be.
It’s impossible for the other types to have 0 as value due to the descending ordering rule mentioned above.
You can also specify the ManeuverNotificationTimingOptions.doubleNotificationDistanceInMeters threshold that determines the distance between two maneuvers that
should be merged into a single maneuver notification, for example, when they are very close to each other. Maneuvers below this
threshold will be merged like in this example: “After 300 meters turn right and then turn left.”.
Tip: To set the timings to the HERE SDK, you can first call getManeuverNotificationTimingOptions() to get the default values
for the desired combination of transport mode and timing profile. Then configure the timings, then set it back by calling the
setManeuverNotificationTimingOptions().
Note: In the comment of each attribute, the term Others refers to non-pedestrian transport modes such as
TransportMode.car, TransportMode.bicycle, TransportMode.truck.
Attention: The default values for TransportMode.pedestrian on TimingProfile.fastSpeed are theoretical, as such
routes cannot be calculated with the HERE SDK as highways are forbidden for pedestrians.
Usage example:
// Get current values or default values, if no values have been set before.
ManeuverNotificationTimingOptions car_highway_timings = Navigator.getManeuverNotificationTimingOptions(TransportMode.car, TimingProfile.FAST_SPEED);
// Set a new value for a specific option and keep the previous or default values for the others.
car_highway_timings.distanceNotificationDistanceInMeters = 1500;
// Apply the changes to Navigator (or VisualNavigator).
Navigator.setManeuverNotificationTimingOptions(TransportMode.car, TimingProfile.FAST_SPEED, car_fast_speed_timings);
-
The default distance setting for
ManeuverNotificationType.rangenotification. A configuration value of 0 is only allowed forManeuverNotificationTimingOptions.rangeNotificationDistanceInMetersandManeuverNotificationTimingOptions.rangeNotificationTimeInSeconds. It means that the maneuver notifications of typeManeuverNotificationType.rangeshould be generated as soon as the maneuver location is known - no matter how far away it may be.Transport Mode Timing Profile Default value TransportMode.pedestrianTimingProfile.fastSpeed0 TransportMode.pedestrianTimingProfile.regularSpeed0 TransportMode.pedestrianTimingProfile.slowSpeed0 Others TimingProfile.fastSpeed0 Others TimingProfile.regularSpeed0 Others TimingProfile.slowSpeed0 Declaration
Swift
public var rangeNotificationDistanceInMeters: Int32 -
The default time setting for
ManeuverNotificationType.rangenotification. A configuration value of 0 is only allowed forManeuverNotificationTimingOptions.rangeNotificationDistanceInMetersandManeuverNotificationTimingOptions.rangeNotificationTimeInSeconds. It means that the maneuver notifications of typeManeuverNotificationType.rangeshould be generated as soon as the maneuver location is known - no matter how far away it may be.Transport Mode Timing Profile Default value TransportMode.pedestrianTimingProfile.fastSpeed0 TransportMode.pedestrianTimingProfile.regularSpeed0 TransportMode.pedestrianTimingProfile.slowSpeed0 Others TimingProfile.fastSpeed0 Others TimingProfile.regularSpeed0 Others TimingProfile.slowSpeed0 Declaration
Swift
public var rangeNotificationTimeInSeconds: Int32 -
The default distance setting for
ManeuverNotificationType.remindernotification.Transport Mode Timing Profile Default value TransportMode.pedestrianTimingProfile.fastSpeed500 TransportMode.pedestrianTimingProfile.regularSpeed500 TransportMode.pedestrianTimingProfile.slowSpeed500 Others TimingProfile.fastSpeed2300 Others TimingProfile.regularSpeed800 Others TimingProfile.slowSpeed600 Declaration
Swift
public var reminderNotificationDistanceInMeters: Int32 -
The default time setting for
ManeuverNotificationType.remindernotification.Transport Mode Timing Profile Default value TransportMode.pedestrianTimingProfile.fastSpeed40 TransportMode.pedestrianTimingProfile.regularSpeed40 TransportMode.pedestrianTimingProfile.slowSpeed40 Others TimingProfile.fastSpeed40 Others TimingProfile.regularSpeed40 Others TimingProfile.slowSpeed40 Declaration
Swift
public var reminderNotificationTimeInSeconds: Int32 -
The default distance setting for
ManeuverNotificationType.distancenotification.Transport Mode Timing Profile Default value TransportMode.pedestrianTimingProfile.fastSpeed100 TransportMode.pedestrianTimingProfile.regularSpeed100 TransportMode.pedestrianTimingProfile.slowSpeed100 Others TimingProfile.fastSpeed1300 Others TimingProfile.regularSpeed300 Others TimingProfile.slowSpeed300 Declaration
Swift
public var distanceNotificationDistanceInMeters: Int32 -
The default time setting for
ManeuverNotificationType.distancenotification.Transport Mode Timing Profile Default value TransportMode.pedestrianTimingProfile.fastSpeed18 TransportMode.pedestrianTimingProfile.regularSpeed18 TransportMode.pedestrianTimingProfile.slowSpeed18 Others TimingProfile.fastSpeed18 Others TimingProfile.regularSpeed18 Others TimingProfile.slowSpeed18 Declaration
Swift
public var distanceNotificationTimeInSeconds: Int32 -
The default distance setting for
ManeuverNotificationType.actionnotification.Transport Mode Timing Profile Default value TransportMode.pedestrianTimingProfile.fastSpeed10 TransportMode.pedestrianTimingProfile.regularSpeed10 TransportMode.pedestrianTimingProfile.slowSpeed10 Others TimingProfile.fastSpeed400 Others TimingProfile.regularSpeed100 Others TimingProfile.slowSpeed50 Declaration
Swift
public var actionNotificationDistanceInMeters: Int32 -
The default time setting for
ManeuverNotificationType.actionnotification.Transport Mode Timing Profile Default value TransportMode.pedestrianTimingProfile.fastSpeed5 TransportMode.pedestrianTimingProfile.regularSpeed5 TransportMode.pedestrianTimingProfile.slowSpeed5 Others TimingProfile.fastSpeed5 Others TimingProfile.regularSpeed5 Others TimingProfile.slowSpeed5 Declaration
Swift
public var actionNotificationTimeInSeconds: Int32 -
The default distance setting for double notification.
Transport Mode Timing Profile Default value TransportMode.pedestrianTimingProfile.fastSpeed20 TransportMode.pedestrianTimingProfile.regularSpeed20 TransportMode.pedestrianTimingProfile.slowSpeed20 Others TimingProfile.fastSpeed750 Others TimingProfile.regularSpeed250 Others TimingProfile.slowSpeed150 Declaration
Swift
public var doubleNotificationDistanceInMeters: Int32 -
init(rangeNotificationDistanceInMeters:rangeNotificationTimeInSeconds: reminderNotificationDistanceInMeters: reminderNotificationTimeInSeconds: distanceNotificationDistanceInMeters: distanceNotificationTimeInSeconds: actionNotificationDistanceInMeters: actionNotificationTimeInSeconds: doubleNotificationDistanceInMeters: ) Creates a new instance.
Parameters
- rangeNotificationDistanceInMeters: The default distance setting for
ManeuverNotificationType.rangenotification. A configuration value of 0 is only allowed forManeuverNotificationTimingOptions.rangeNotificationDistanceInMetersandManeuverNotificationTimingOptions.rangeNotificationTimeInSeconds. It means that the maneuver notifications of typeManeuverNotificationType.rangeshould be generated as soon as the maneuver location is known - no matter how far away it may be.
| Transport Mode | Timing Profile | Default value | | —————————————- | ——————————| —————————————- | |
TransportMode.pedestrian|TimingProfile.fastSpeed| 0 | |TransportMode.pedestrian|TimingProfile.regularSpeed| 0 | |TransportMode.pedestrian|TimingProfile.slowSpeed| 0 | | Others |TimingProfile.fastSpeed| 0 | | Others |TimingProfile.regularSpeed| 0 | | Others |TimingProfile.slowSpeed| 0 |- rangeNotificationTimeInSeconds: The default time setting for
ManeuverNotificationType.rangenotification. A configuration value of 0 is only allowed forManeuverNotificationTimingOptions.rangeNotificationDistanceInMetersandManeuverNotificationTimingOptions.rangeNotificationTimeInSeconds. It means that the maneuver notifications of typeManeuverNotificationType.rangeshould be generated as soon as the maneuver location is known - no matter how far away it may be.
| Transport Mode | Timing Profile | Default value | | —————————————- | ——————————| —————————————- | |
TransportMode.pedestrian|TimingProfile.fastSpeed| 0 | |TransportMode.pedestrian|TimingProfile.regularSpeed| 0 | |TransportMode.pedestrian|TimingProfile.slowSpeed| 0 | | Others |TimingProfile.fastSpeed| 0 | | Others |TimingProfile.regularSpeed| 0 | | Others |TimingProfile.slowSpeed| 0 |- reminderNotificationDistanceInMeters: The default distance setting for
ManeuverNotificationType.remindernotification.
| Transport Mode | Timing Profile | Default value | | —————————————- | ——————————| —————————————- | |
TransportMode.pedestrian|TimingProfile.fastSpeed| 500 | |TransportMode.pedestrian|TimingProfile.regularSpeed| 500 | |TransportMode.pedestrian|TimingProfile.slowSpeed| 500 | | Others |TimingProfile.fastSpeed| 2300 | | Others |TimingProfile.regularSpeed| 800 | | Others |TimingProfile.slowSpeed| 600 |- reminderNotificationTimeInSeconds: The default time setting for
ManeuverNotificationType.remindernotification.
| Transport Mode | Timing Profile | Default value | | —————————————- | —————————– | —————————————- | |
TransportMode.pedestrian|TimingProfile.fastSpeed| 40 | |TransportMode.pedestrian|TimingProfile.regularSpeed| 40 | |TransportMode.pedestrian|TimingProfile.slowSpeed| 40 | | Others |TimingProfile.fastSpeed| 40 | | Others |TimingProfile.regularSpeed| 40 | | Others |TimingProfile.slowSpeed| 40 |- distanceNotificationDistanceInMeters: The default distance setting for
ManeuverNotificationType.distancenotification.
| Transport Mode | Timing Profile | Default value | | —————————————- | —————————– | —————————————- | |
TransportMode.pedestrian|TimingProfile.fastSpeed| 100 | |TransportMode.pedestrian|TimingProfile.regularSpeed| 100 | |TransportMode.pedestrian|TimingProfile.slowSpeed| 100 | | Others |TimingProfile.fastSpeed| 1300 | | Others |TimingProfile.regularSpeed| 300 | | Others |TimingProfile.slowSpeed| 300 |- distanceNotificationTimeInSeconds: The default time setting for
ManeuverNotificationType.distancenotification.
| Transport Mode | Timing Profile | Default value | | —————————————- | —————————– | —————————————- | |
TransportMode.pedestrian|TimingProfile.fastSpeed| 18 | |TransportMode.pedestrian|TimingProfile.regularSpeed| 18 | |TransportMode.pedestrian|TimingProfile.slowSpeed| 18 | | Others |TimingProfile.fastSpeed| 18 | | Others |TimingProfile.regularSpeed| 18 | | Others |TimingProfile.slowSpeed| 18 |- actionNotificationDistanceInMeters: The default distance setting for
ManeuverNotificationType.actionnotification.
| Transport Mode | Timing Profile | Default value | | —————————————- | ——————————| —————————————- | |
TransportMode.pedestrian|TimingProfile.fastSpeed| 10 | |TransportMode.pedestrian|TimingProfile.regularSpeed| 10 | |TransportMode.pedestrian|TimingProfile.slowSpeed| 10 | | Others |TimingProfile.fastSpeed| 400 | | Others |TimingProfile.regularSpeed| 100 | | Others |TimingProfile.slowSpeed| 50 |- actionNotificationTimeInSeconds: The default time setting for
ManeuverNotificationType.actionnotification.
| Transport Mode | Timing Profile | Default value | | —————————————- | —————————– | —————————————- | |
TransportMode.pedestrian|TimingProfile.fastSpeed| 5 | |TransportMode.pedestrian|TimingProfile.regularSpeed| 5 | |TransportMode.pedestrian|TimingProfile.slowSpeed| 5 | | Others |TimingProfile.fastSpeed| 5 | | Others |TimingProfile.regularSpeed| 5 | | Others |TimingProfile.slowSpeed| 5 |- doubleNotificationDistanceInMeters: The default distance setting for double notification.
| Transport Mode | Timing Profile | Default value | | —————————————- | —————————– | —————————————- | |
TransportMode.pedestrian|TimingProfile.fastSpeed| 20 | |TransportMode.pedestrian|TimingProfile.regularSpeed| 20 | |TransportMode.pedestrian|TimingProfile.slowSpeed| 20 | | Others |TimingProfile.fastSpeed| 750 | | Others |TimingProfile.regularSpeed| 250 | | Others |TimingProfile.slowSpeed| 150 |- rangeNotificationDistanceInMeters: The default distance setting for
Declaration
Swift
public init(rangeNotificationDistanceInMeters: Int32, rangeNotificationTimeInSeconds: Int32, reminderNotificationDistanceInMeters: Int32, reminderNotificationTimeInSeconds: Int32, distanceNotificationDistanceInMeters: Int32, distanceNotificationTimeInSeconds: Int32, actionNotificationDistanceInMeters: Int32, actionNotificationTimeInSeconds: Int32, doubleNotificationDistanceInMeters: Int32)