GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSNavigationTimeAndDistance
@interface GMSNavigationTimeAndDistance : NSObject
An immutable class that encapsulates the distance remaining and the ETA for a route.
-
The duration for this route, in seconds.
Declaration
Swift
var durationSeconds: TimeInterval { get }
Objective-C
@property (nonatomic, readonly) NSTimeInterval durationSeconds;
-
The travel distance of this route, in meters.
Declaration
Swift
var distanceMeters: CLLocationDistance { get }
Objective-C
@property (nonatomic, readonly) CLLocationDistance distanceMeters;
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\u003eGMSNavigationTimeAndDistance\u003c/code\u003e is an immutable object providing route information.\u003c/p\u003e\n"],["\u003cp\u003eIt includes the estimated travel time (\u003ccode\u003edurationSeconds\u003c/code\u003e) in seconds.\u003c/p\u003e\n"],["\u003cp\u003eIt also includes the total travel distance (\u003ccode\u003edistanceMeters\u003c/code\u003e) in meters.\u003c/p\u003e\n"]]],[],null,["# GoogleNavigation Framework Reference\n\nGMSNavigationTimeAndDistance\n============================\n\n @interface GMSNavigationTimeAndDistance : NSObject\n\nAn immutable class that encapsulates the distance remaining and the ETA for a route.\n- `\n ``\n ``\n `\n\n ### [durationSeconds](#/c:objc(cs)GMSNavigationTimeAndDistance(py)durationSeconds)\n\n `\n ` \n The duration for this route, in seconds. \n\n #### Declaration\n\n Swift \n\n var durationSeconds: TimeInterval { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSTimeInterval durationSeconds;\n\n- `\n ``\n ``\n `\n\n ### [distanceMeters](#/c:objc(cs)GMSNavigationTimeAndDistance(py)distanceMeters)\n\n `\n ` \n The travel distance of this route, in meters. \n\n #### Declaration\n\n Swift \n\n var distanceMeters: CLLocationDistance { get }\n\n Objective-C \n\n @property (nonatomic, readonly) CLLocationDistance distanceMeters;"]]