setWarningNotificationDistances abstract method

bool setWarningNotificationDistances(
  1. WarningType warningType,
  2. WarningNotificationDistances warningNotificationDistances
)

Set the warning notification distances for the specified warning types.

Note: The warning notification distances are set for most warners. This method can't be used to set the warning notification distance for the School Zone warning type because it is applicable regardless of the timing profile. Use NavigatorInterface.school_zone_warning_options instead. Attempting to set the warning notification distances for the school zone warner using the NavigatorInterface.set_warning_notification_distances method will fail and return false. Always use SchoolZoneWarningOptions.warning_distance_in_meters to set the warning notification distance for the school zone warner regardless of the TimingProfile. If NavigatorInterface.set_warning_notification_distances could be used, this would allow for different distances to be set for each timing profile, which is undesirable. Attempting to set the warning notification distances for the traffic merge warner using the NavigatorInterface.set_warning_notification_distances method will fail and return false. Always use TrafficMergeWarningOptions.warning_distance_in_meters to set the warning notification distance for the traffic merge warner regardless of the TimingProfile. Using the NavigatorInterface.set_warning_notification_distances method will fail and return false to avoid seting different distances on each timing profile since the traffic merge warning is only applicable on highways.

  • warningType The warning type for which the warning notification distances will be set.

  • warningNotificationDistances The warning notification distances to be set for the specified warning types.

Returns bool. True if set successfully, false when the warning_type is WarningType.SCHOOL_ZONE or the options have invalid values, see WarningNotificationDistances for more details about warning notification distances.

Implementation

bool setWarningNotificationDistances(WarningType warningType, WarningNotificationDistances warningNotificationDistances);