GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSNavigationNavInfo
@interface GMSNavigationNavInfo : NSObject
Contains information about the state of navigation
-
-
Information about the upcoming maneuver step. This is only set if the navState is
GMSNavigationNavStateEnroute
and will be null otherwise.
-
The remaining steps after the current step.
-
Whether the route has changed since the last sent message. A route change may be caused by a
reroute, the addition/removal of a waypoint, the user selecting or driving onto an alternate
route, or a traffic update.
Declaration
Swift
var routeChanged: Bool { get }
Objective-C
@property (nonatomic, readonly) BOOL routeChanged;
-
The estimated remaining time in seconds along the route to the current step.
Declaration
Swift
var timeToCurrentStepSeconds: TimeInterval { get }
Objective-C
@property (nonatomic, readonly) NSTimeInterval timeToCurrentStepSeconds;
-
The estimated remaining distance in meters along the route to the current step .
Declaration
Swift
var distanceToCurrentStepMeters: CLLocationDistance { get }
Objective-C
@property (nonatomic, readonly) CLLocationDistance distanceToCurrentStepMeters;
-
The estimated remaining time in seconds to the final destination.
Declaration
Swift
var timeToFinalDestinationSeconds: TimeInterval { get }
Objective-C
@property (nonatomic, readonly) NSTimeInterval timeToFinalDestinationSeconds;
-
The estimated remaining distance in meters to the final destination.
Declaration
Swift
var distanceToFinalDestinationMeters: CLLocationDistance { get }
Objective-C
@property (nonatomic, readonly) CLLocationDistance distanceToFinalDestinationMeters;
-
Returns a time rounded to the nearest minute, with a minimum of one minute.
This can be useful when displaying route information to users, since it can be
confusing to display times such a “0 min”.
Due to the above, input values to this method should always be positive.
Declaration
Swift
func roundedTime(_ timeSeconds: TimeInterval) -> TimeInterval
Objective-C
- (NSTimeInterval)roundedTime:(NSTimeInterval)timeSeconds;
-
Returns a rounded measurement representing the given distance, taking into account user
preferences and the recommended distance unit for the route.
Declaration
Swift
func roundedDistance(_ distanceMeters: CLLocationDistance) -> Measurement<UnitLength>
Objective-C
- (nonnull NSMeasurement<NSUnitLength *> *)roundedDistance:
(CLLocationDistance)distanceMeters;
-
The formatted instructions for the given step.
-
Declaration
Objective-C
- (null_unspecified instancetype)init NS_UNAVAILABLE;
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\u003eGMSNavigationNavInfo\u003c/code\u003e provides real-time navigation state information, including the current step, remaining steps, and route changes.\u003c/p\u003e\n"],["\u003cp\u003eIt offers estimated time and distance to the next step and the final destination.\u003c/p\u003e\n"],["\u003cp\u003eIncludes helper methods for rounding time and distance values for user-friendly display.\u003c/p\u003e\n"],["\u003cp\u003eProvides formatted instructions for navigation steps using \u003ccode\u003eGMSNavigationInstructionOptions\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt's an essential object for building navigation experiences with the Google Maps SDK for iOS.\u003c/p\u003e\n"]]],[],null,["# GoogleNavigation Framework Reference\n\nGMSNavigationNavInfo\n====================\n\n @interface GMSNavigationNavInfo : NSObject\n\nContains information about the state of navigation\n- `\n ``\n ``\n `\n\n ### [navState](#/c:objc(cs)GMSNavigationNavInfo(py)navState)\n\n `\n ` \n The current [GMSNavigationNavState](../Enums/GMSNavigationNavState.html) for navigation. \n\n #### Declaration\n\n Swift \n\n var navState: ../Enums/GMSNavigationNavState.html { get }\n\n Objective-C \n\n @property (nonatomic, readonly) ../Enums/GMSNavigationNavState.html navState;\n\n- `\n ``\n ``\n `\n\n ### [currentStep](#/c:objc(cs)GMSNavigationNavInfo(py)currentStep)\n\n `\n ` \n Information about the upcoming maneuver step. This is only set if the navState is\n `GMSNavigationNavStateEnroute` and will be null otherwise. \n\n #### Declaration\n\n Swift \n\n var currentStep: ../Classes/GMSNavigationStepInfo.html? { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) ../Classes/GMSNavigationStepInfo.html *currentStep;\n\n- `\n ``\n ``\n `\n\n ### [remainingSteps](#/c:objc(cs)GMSNavigationNavInfo(py)remainingSteps)\n\n `\n ` \n The remaining steps after the current step. \n\n #### Declaration\n\n Swift \n\n var remainingSteps: [../Classes/GMSNavigationStepInfo.html] { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSArray\u003c../Classes/GMSNavigationStepInfo.html *\u003e *_Nonnull remainingSteps;\n\n- `\n ``\n ``\n `\n\n ### [routeChanged](#/c:objc(cs)GMSNavigationNavInfo(py)routeChanged)\n\n `\n ` \n Whether the route has changed since the last sent message. A route change may be caused by a\n reroute, the addition/removal of a waypoint, the user selecting or driving onto an alternate\n route, or a traffic update. \n\n #### Declaration\n\n Swift \n\n var routeChanged: Bool { get }\n\n Objective-C \n\n @property (nonatomic, readonly) BOOL routeChanged;\n\n- `\n ``\n ``\n `\n\n ### [timeToCurrentStepSeconds](#/c:objc(cs)GMSNavigationNavInfo(py)timeToCurrentStepSeconds)\n\n `\n ` \n The estimated remaining time in seconds along the route to the current step. \n\n #### Declaration\n\n Swift \n\n var timeToCurrentStepSeconds: TimeInterval { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSTimeInterval timeToCurrentStepSeconds;\n\n- `\n ``\n ``\n `\n\n ### [distanceToCurrentStepMeters](#/c:objc(cs)GMSNavigationNavInfo(py)distanceToCurrentStepMeters)\n\n `\n ` \n The estimated remaining distance in meters along the route to the current step . \n\n #### Declaration\n\n Swift \n\n var distanceToCurrentStepMeters: CLLocationDistance { get }\n\n Objective-C \n\n @property (nonatomic, readonly) CLLocationDistance distanceToCurrentStepMeters;\n\n- `\n ``\n ``\n `\n\n ### [timeToFinalDestinationSeconds](#/c:objc(cs)GMSNavigationNavInfo(py)timeToFinalDestinationSeconds)\n\n `\n ` \n The estimated remaining time in seconds to the final destination. \n\n #### Declaration\n\n Swift \n\n var timeToFinalDestinationSeconds: TimeInterval { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSTimeInterval timeToFinalDestinationSeconds;\n\n- `\n ``\n ``\n `\n\n ### [distanceToFinalDestinationMeters](#/c:objc(cs)GMSNavigationNavInfo(py)distanceToFinalDestinationMeters)\n\n `\n ` \n The estimated remaining distance in meters to the final destination. \n\n #### Declaration\n\n Swift \n\n var distanceToFinalDestinationMeters: CLLocationDistance { get }\n\n Objective-C \n\n @property (nonatomic, readonly) CLLocationDistance distanceToFinalDestinationMeters;\n\n- `\n ``\n ``\n `\n\n ### [-roundedTime:](#/c:objc(cs)GMSNavigationNavInfo(im)roundedTime:)\n\n `\n ` \n Returns a time rounded to the nearest minute, with a minimum of one minute.\n\n This can be useful when displaying route information to users, since it can be\n confusing to display times such a \"0 min\".\n\n Due to the above, input values to this method should always be positive. \n\n #### Declaration\n\n Swift \n\n func roundedTime(_ timeSeconds: TimeInterval) -\u003e TimeInterval\n\n Objective-C \n\n - (NSTimeInterval)roundedTime:(NSTimeInterval)timeSeconds;\n\n- `\n ``\n ``\n `\n\n ### [-roundedDistance:](#/c:objc(cs)GMSNavigationNavInfo(im)roundedDistance:)\n\n `\n ` \n Returns a rounded measurement representing the given distance, taking into account user\n preferences and the recommended distance unit for the route. \n\n #### Declaration\n\n Swift \n\n func roundedDistance(_ distanceMeters: CLLocationDistance) -\u003e Measurement\u003cUnitLength\u003e\n\n Objective-C \n\n - (nonnull NSMeasurement\u003cNSUnitLength *\u003e *)roundedDistance:\n (CLLocationDistance)distanceMeters;\n\n- `\n ``\n ``\n `\n\n ### [-instructionsForStep:options:](#/c:objc(cs)GMSNavigationNavInfo(im)instructionsForStep:options:)\n\n `\n ` \n The formatted instructions for the given step. \n\n #### Declaration\n\n Swift \n\n func instructions(forStep stepInfo: ../Classes/GMSNavigationStepInfo.html, options: ../Classes/GMSNavigationInstructionOptions.html) -\u003e [NSAttributedString]\n\n Objective-C \n\n - (nonnull NSArray\u003cNSAttributedString *\u003e *)\n instructionsForStep:(nonnull ../Classes/GMSNavigationStepInfo.html *)stepInfo\n options:(nonnull ../Classes/GMSNavigationInstructionOptions.html *)options;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMSNavigationNavInfo(im)init)\n\n `\n ` \n Unavailable \n\n #### Declaration\n\n Objective-C \n\n - (null_unspecified instancetype)init NS_UNAVAILABLE;"]]