GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSNavigationSpeedometerUIOptions
@interface GMSNavigationSpeedometerUIOptions
: NSObject <NSCopying, NSMutableCopying>
An immutable class that encapsulates UI configuration for different severities of speed alerts,
represented by GMSNavigationSpeedAlertSeverity
.
You can use this class to customize the speed alert UI, such as the colors of the font and icon
background of minor and major speed alert.
You use GMSNavigationSpeedometerUIOptions
to customize the speed alert UI for different
severities. You must use GMSNavigationSpeedAlertOptions
to define the triggering thresholds
for each severity of speed alert.
-
- Gets the color of the speed alert text to use for the specified speed alert severity and
- lighting mode.
*
- @note: This returns
UIColor.clearColor
for GMSNavigationSpeedAlertSeverityUnknown
and
GMSNavigationSpeedAlertSeverityNotSpeeding.
-
- Gets the speed alert icon background color to use for the specified speed alert severity and
- lighting mode.
*
- @note: This returns
UIColor.clearColor
for GMSNavigationSpeedAlertSeverityUnknown
and
GMSNavigationSpeedAlertSeverityNotSpeeding.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSNavigationSpeedometerUIOptions\u003c/code\u003e is an immutable class used to customize the UI of speed alerts during navigation.\u003c/p\u003e\n"],["\u003cp\u003eIt allows customization of the speed alert UI elements, such as text and background colors, for different speed alert severities (minor, major, etc.).\u003c/p\u003e\n"],["\u003cp\u003eIt works in conjunction with \u003ccode\u003eGMSNavigationSpeedAlertOptions\u003c/code\u003e which defines the thresholds for triggering each speed alert severity.\u003c/p\u003e\n"],["\u003cp\u003eProvides methods to get the text color and background color for different speed alert severities and lighting modes.\u003c/p\u003e\n"]]],["`GMSNavigationSpeedometerUIOptions` configures the UI for speed alerts, customizing font colors and icon backgrounds for different severities. It allows setting text and background colors based on `GMSNavigationSpeedAlertSeverity` and `GMSNavigationLightingMode`. `textColorForSpeedAlertSeverity:lightingMode:` retrieves the text color. `backgroundColorForSpeedAlertSeverity:lightingMode:` retrieves the icon's background color. Both return `UIColor.clearColor` for `GMSNavigationSpeedAlertSeverityUnknown` and `GMSNavigationSpeedAlertSeverityNotSpeeding`. `GMSNavigationSpeedAlertOptions` is used to define speed alert triggering thresholds.\n"],null,["# GoogleNavigation Framework Reference\n\nGMSNavigationSpeedometerUIOptions\n=================================\n\n @interface GMSNavigationSpeedometerUIOptions\n : NSObject \u003cNSCopying, NSMutableCopying\u003e\n\nAn immutable class that encapsulates UI configuration for different severities of speed alerts,\nrepresented by [GMSNavigationSpeedAlertSeverity](../Enums/GMSNavigationSpeedAlertSeverity.html).\n\nYou can use this class to customize the speed alert UI, such as the colors of the font and icon\nbackground of minor and major speed alert.\n\nYou use `GMSNavigationSpeedometerUIOptions` to customize the speed alert UI for different\nseverities. You must use [GMSNavigationSpeedAlertOptions](../Classes/GMSNavigationSpeedAlertOptions.html) to define the triggering thresholds\nfor each severity of speed alert.\n- `\n ``\n ``\n `\n\n ### [-textColorForSpeedAlertSeverity:lightingMode:](#/c:objc(cs)GMSNavigationSpeedometerUIOptions(im)textColorForSpeedAlertSeverity:lightingMode:)\n\n `\n ` \n - Gets the color of the speed alert text to use for the specified speed alert severity and\n - lighting mode. \\*\n - @note: This returns `UIColor.clearColor` for `GMSNavigationSpeedAlertSeverityUnknown` and\n - `GMSNavigationSpeedAlertSeverityNotSpeeding.\n ` \n\n #### Declaration\n\n Swift \n\n func textColor(for speedAlertSeverity: ../Enums/GMSNavigationSpeedAlertSeverity.html, lightingMode: ../Enums/GMSNavigationLightingMode.html) -\u003e UIColor\n\n Objective-C \n\n - (nonnull UIColor *)textColorForSpeedAlertSeverity:\n (../Enums/GMSNavigationSpeedAlertSeverity.html)speedAlertSeverity\n lightingMode:(../Enums/GMSNavigationLightingMode.html)\n lightingMode;\n\n- `\n ``\n ``\n `\n\n ### [-backgroundColorForSpeedAlertSeverity:lightingMode:](#/c:objc(cs)GMSNavigationSpeedometerUIOptions(im)backgroundColorForSpeedAlertSeverity:lightingMode:)\n\n `\n ` \n - Gets the speed alert icon background color to use for the specified speed alert severity and\n - lighting mode. \\*\n - @note: This returns `UIColor.clearColor` for `GMSNavigationSpeedAlertSeverityUnknown` and\n - `GMSNavigationSpeedAlertSeverityNotSpeeding.\n ` \n\n #### Declaration\n\n Swift \n\n func backgroundColor(for speedAlertSeverity: ../Enums/GMSNavigationSpeedAlertSeverity.html, lightingMode: ../Enums/GMSNavigationLightingMode.html) -\u003e UIColor\n\n Objective-C \n\n - (nonnull UIColor *)backgroundColorForSpeedAlertSeverity:\n (../Enums/GMSNavigationSpeedAlertSeverity.html)speedAlertSeverity\n lightingMode:\n (../Enums/GMSNavigationLightingMode.html)\n lightingMode;"]]