GMSNavigationMutableSpeedAlertOptions Class Reference

GMSNavigationMutableSpeedAlertOptions Class Reference

Overview

A mutable class that defines triggering thresholds for different severities of speed alerts, represented by GMSNavigationSpeedAlertSeverity.

Inherits GMSNavigationSpeedAlertOptions.

Public Member Functions

(void) - setSpeedAlertThresholdPercentage:forSpeedAlertSeverity:
 Sets the speed alert threshold in percentage for the specific GMSNavigationSpeedAlertSeverity.
(CGFloat) - thresholdPercentageForSpeedAlertSeverity:
 Gets the speed alert threshold (as a percentage) for the specific GMSNavigationSpeedAlertSeverity.

Properties

NSTimeInterval severityUpgradeDurationSeconds
 The duration threshold controls the speed alert severity upgrade.

Member Function Documentation

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

Sets the speed alert threshold in percentage for the specific GMSNavigationSpeedAlertSeverity.

One severity of speed alert is triggered when the speed exceeds the corresponding threshold.

If both minor and major speed alert threshold are set, the major speed alert threshold must be smaller than the major one. If only one speed alert severity's threshold is set, the other severity of speed alert will not be triggered.

If you set the minor threshold to a value larger than the major threshold, the options updates the major threshold to equal the minor threshold. And vice versa.

Parameters:
percentageAboveLimitPercentage threshold above the speed limit. A value of 0.0 represents 0%, and 1.0 represents 100%. A negative value indicates no threshold being set for that speedingType.
speedAlertSeveritySpeed alert severity for the given threshold.

Gets the speed alert threshold (as a percentage) for the specific GMSNavigationSpeedAlertSeverity.

A value of 0.0 represents 0%, and 1.0 represents 100%. A negative value indicates no threshold being set for that speedingType.


Property Documentation

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

The duration threshold controls the speed alert severity upgrade.

A major speed alert is triggered when the speed exceeds the minor speed alert threshold for more than the given number of seconds. This duration threshold is used only if the minor threshold percentage is set. A negative value indicates no duration threshold.

Implements GMSNavigationSpeedAlertOptions.