GMSNavigationSpeedAlertOptions 类参考

GMSNavigationSpeedAlertOptions 类参考

概览

一个不可变类,用于定义不同严重程度的速度警报的触发阈值,由 GMSNavigationSpeedAlertSeverity 表示。

您可以使用此功能以百分比的形式自定义次要和重大警报的速度警报触发阈值,并自定义主要速度警报的基于时间的触发阈值。

对于由此 GMSNavigationSpeedAlertOptions 中的相应阈值触发的速度警报,系统会在 GMSNavigationSpeedometerUIOptions 中自定义界面(若已设置)。

GMSNavigationMutableSpeedAlertOptions 继承。

公开成员函数

(CGFloat)- thresholdPercentageForSpeedAlertSeverity
 获取特定 GMSNavigationSpeedAlertSeverity 的速度提醒阈值(以百分比表示)。

属性

NSTimeInterval severityUpgradeDurationSeconds
 时长阈值用于控制速度提醒严重程度的升级。

成员函数文档

获取特定 GMSNavigationSpeedAlertSeverity 的速度提醒阈值(以百分比表示)。

值为 0.0 表示 0%,而 1.0 表示 100%。负值表示没有为该 speedingType 设置阈值。


属性说明

- (NSTimeInterval) severityUpgradeDurationSeconds [read, assign]

时长阈值用于控制速度提醒严重程度的升级。

当速度超过次要速度提醒阈值的时间超过指定秒数时,就会触发主要速度提醒。

GMSNavigationMutableSpeedAlertOptions 中实现。