GMSNavigationMutableSpeedAlertOptions 类参考

GMSNavigationMutableSpeedAlertOptions 类参考

概览

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

继承 GMSNavigationSpeedAlertOptions

公开成员函数

(void) - setSpeedAlertThresholdPercentage:forSpeedAlertSeverity
 针对特定 GMSNavigationSpeedAlertSeverity 设置速度提醒阈值(以百分比表示)。
(CGFloat)- thresholdPercentageForSpeedAlertSeverity
 获取特定 GMSNavigationSpeedAlertSeverity 的速度提醒阈值(以百分比表示)。

属性

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

成员函数文档

- (void) setSpeedAlertThresholdPercentage: (CGFloat) percentageAboveLimit
forSpeedAlertSeverity: (GMSNavigationSpeedAlertSeverity) speedAlertSeverity

针对特定 GMSNavigationSpeedAlertSeverity 设置速度提醒阈值(以百分比表示)。

当速度超过相应阈值时,就会触发一种严重级别的速度提醒。

如果同时设置了小速度和大速度警报阈值,则主要速度警报阈值必须小于主要速度警报阈值。如果只设置了一项速度警报严重级别的阈值,则不会触发另一种严重级别的速度警报。

如果您设置的次要阈值大于主要阈值,则相应选项会将主要阈值更新为与次要阈值相等。反之亦然。

参数:
percentageAboveLimit超过速度限制的百分比阈值。值为 0.0 表示 0%,而 1.0 表示 100%。负值表示没有为该 speedingType 设置阈值。
speedAlertSeverity指定阈值的速度警报严重级别。

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

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


属性说明

- (NSTimeInterval) severityUpgradeDurationSeconds [read, write, assign]

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

当速度超过次要速度提醒阈值的时间超过指定秒数时,就会触发主要速度提醒。只有在设置了次要阈值百分比时,系统才会使用此时长阈值。负值表示无时长阈值。

实现 GMSNavigationSpeedAlertOptions