GMSNavigationNavInfo Class Reference

GMSNavigationNavInfo Class Reference

Overview

Contains information about the state of navigation.

Public Member Functions

(NSTimeInterval) - roundedTime:
 Returns a time rounded to the nearest minute, with a minimum of one minute.
(NSMeasurement< NSUnitLength * > *) - roundedDistance:
 Returns a rounded measurement representing the given distance, taking into account user preferences and the recommended distance unit for the route.
(NSArray< NSAttributedString * > *) - instructionsForStep:options:
 The formatted instructions for the given step.

Properties

GMSNavigationNavState navState
 The current GMSNavigationNavState for navigation.
GMSNavigationStepInfocurrentStep
 Information about the upcoming maneuver step.
NSArray< GMSNavigationStepInfo * > * remainingSteps
 The remaining steps after the current step.
BOOL routeChanged
 Whether the route has changed since the last sent message.
NSTimeInterval timeToCurrentStepSeconds
 The estimated remaining time in seconds along the route to the current step.
CLLocationDistance distanceToCurrentStepMeters
 The estimated remaining distance in meters along the route to the current step .
NSTimeInterval timeToFinalDestinationSeconds
 The estimated remaining time in seconds to the final destination.
CLLocationDistance distanceToFinalDestinationMeters
 The estimated remaining distance in meters to the final destination.

Member Function Documentation

- (NSTimeInterval) roundedTime: (NSTimeInterval)  timeSeconds

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.

- (NSMeasurement<NSUnitLength *> *) roundedDistance: (CLLocationDistance)  distanceMeters

Returns a rounded measurement representing the given distance, taking into account user preferences and the recommended distance unit for the route.

- (NSArray<NSAttributedString *> *) instructionsForStep: (GMSNavigationStepInfo *)  stepInfo
options: (GMSNavigationInstructionOptions *)  options 

The formatted instructions for the given step.


Property Documentation

- (GMSNavigationNavState) navState [read, assign]

The current GMSNavigationNavState for navigation.

- (GMSNavigationStepInfo*) currentStep [read, assign]

Information about the upcoming maneuver step.

This is only set if the navState is GMSNavigationNavStateEnroute and will be null otherwise.

- (NSArray<GMSNavigationStepInfo *>*) remainingSteps [read, assign]

The remaining steps after the current step.

- (BOOL) routeChanged [read, assign]

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.

- (NSTimeInterval) timeToCurrentStepSeconds [read, assign]

The estimated remaining time in seconds along the route to the current step.

- (CLLocationDistance) distanceToCurrentStepMeters [read, assign]

The estimated remaining distance in meters along the route to the current step .

- (NSTimeInterval) timeToFinalDestinationSeconds [read, assign]

The estimated remaining time in seconds to the final destination.

- (CLLocationDistance) distanceToFinalDestinationMeters [read, assign]

The estimated remaining distance in meters to the final destination.