# GMSNavigator

    @interface GMSNavigator : NSObject

This is the main class of the Google Navigation SDK for iOS and provides methods for controlling
navigation to a destination and accessing route and progress information.

This class does not support subclassing.

This class is not thread-safe. All methods must be called from the main thread.
- `


  ### [-init](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)init)


  ` Unavailable

  #### Declaration

  Objective-C

      - (instancetype)init NS_UNAVAILABLE;

- `


  ### [-addListener:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)addListener:)


  ` Adds a listener. The listener is held with a weak reference.

  #### Declaration

  Swift

      func add(_ listener: any https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigatorListener.html)

  Objective-C

      - (void)addListener:(nonnull id<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigatorListener.html>)listener;

  #### Parameters

  |---|---|
  | ` listener ` | An object conforming to the `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigatorListener.html` protocol. |

- `


  ### [-removeListener:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)removeListener:)


  ` Removes a listener.

  #### Declaration

  Swift

      func remove(_ listener: any https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigatorListener.html) -> Bool

  Objective-C

      - (BOOL)removeListener:(nonnull id<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigatorListener.html>)listener;

  #### Parameters

  |---|---|
  | ` listener ` | An object conforming to the `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigatorListener.html` protocol. |

  #### Return Value

  Returns YES if the listener was removed. Returns NO if the object was not a listener.
[## Destinations and Routes](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/Destinations-and-Routes)

- `


  ### [-setDestinations:callback:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)setDestinations:callback:)


  ` Deprecated

  Use setDestinations:completionHandler: instead.
  Sets multiple destinations for navigation, overriding any previously set destinations.

  The provided callback will be called with `GMSRouteStatusOK` if a route is found from the
  device's location to the given destination. If a new destination is set before a route is found,
  then the request will be canceled, and the callback will be called with `GMSRouteStatusCanceled`.
  If a route cannot be found for any other reason, the callback will be called with an appropriate
  error status.
  Note

  When navigating a route with multiple waypoints, it is the application's responsibility to
  notice arrival at each waypoint, either by listening to `-navigator:didArriveAtWaypoint:` or by
  independently verifying arrival; and to then update the destinations, either by calling one of
  the `-setDestinations:...` methods or by calling `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator.html#/c:objc(cs)GMSNavigator(im)continueToNextDestinationWithCompletion:`.
  Also, if `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator.html#/c:objc(cs)GMSNavigator(py)stopGuidanceAtArrival` is set to `YES`, the application will need to start guidance
  again after updating the destinations.
  Note

  Calls to `-setDestinations:callback:` clear the traveled path.

  #### Declaration

  Swift

      func setDestinations(_ destinations: [https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html], callback: @escaping https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteStatusCallback.html)

  Objective-C

      - (void)setDestinations:(nonnull NSArray<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html *> *)destinations
                     callback:(nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteStatusCallback.html)callback;

  #### Parameters

  |---|---|
  | ` destinations ` | An array of destination waypoints. |
  | ` callback ` | Called asynchronously on the main queue when a route from the consumer's location to the provided destination(s) is found, or fails to be found for a reason indicated by the RouteStatus. |

- `


  ### [-setDestinations:routingOptions:callback:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)setDestinations:routingOptions:callback:)


  ` Deprecated

  Use setDestinations:routingOptions:completionHandler: instead.
  Sets multiple destinations for navigation, overriding any previously set destinations. The
  returned routes are calculated using routing options.
  Note

  Calls to `-setDestinations:routingOptions:callback:` clear the traveled path.

  #### Declaration

  Swift

      func setDestinations(_ destinations: [https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html], routingOptions: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationRoutingOptions.html, callback: @escaping https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteStatusCallback.html)

  Objective-C

      - (void)setDestinations:(nonnull NSArray<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html *> *)destinations
               routingOptions:(nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationRoutingOptions.html *)routingOptions
                     callback:(nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteStatusCallback.html)callback;

  #### Parameters

  |---|---|
  | ` destinations ` | An array of destination waypoints. |
  | ` routingOptions ` | The options that influence routing logic (routing strategy). |
  | ` callback ` | Called asynchronously on the main queue when a route from the consumer's location to the provided destination(s) is found, or fails to be found for a reason indicated by the RouteStatus. |

- `


  ### [-setDestinations:completionHandler:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)setDestinations:completionHandler:)


  ` Sets multiple destinations for navigation, overriding any previously set destinations.
  Note

  Calls to `-setDestinations:completionHandler:` clear the traveled path.

  #### Declaration

  Swift

      func setDestinations(_ destinations: [https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html]) async throws -> any NavigationRouteDescription

  Objective-C

      - (void)setDestinations:(nonnull NSArray<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html *> *)destinations
            completionHandler:
                (nullable https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationRouteCompletionHandler.html)completionHandler;

  #### Parameters

  |---|---|
  | ` destinations ` | An array of destination waypoints. |
  | ` completionHandler ` | Called asynchronously on the main queue when a route from the device's location to the provided destination(s) is found, or fails to be found for a reason indicated by the `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigationRouteDescription.html` and `NSError`. |

- `


  ### [-setDestinations:routingOptions:completionHandler:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)setDestinations:routingOptions:completionHandler:)


  ` Sets multiple destinations for navigation, overriding any previously set destinations. The
  returned routes are calculated using routing options.
  Note

  Calls to `-setDestinations:routingOptions:completionHandler:` clear the traveled path.

  #### Declaration

  Swift

      func setDestinations(_ destinations: [https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html], routingOptions: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationRoutingOptions.html) async throws -> any NavigationRouteDescription

  Objective-C

      - (void)setDestinations:(nonnull NSArray<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html *> *)destinations
               routingOptions:(nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationRoutingOptions.html *)routingOptions
            completionHandler:
                (nullable https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationRouteCompletionHandler.html)completionHandler;

  #### Parameters

  |---|---|
  | ` destinations ` | An array of destination waypoints. |
  | ` routingOptions ` | The options that influence routing logic (routing strategy). |
  | ` completionHandler ` | Called asynchronously on the main queue when a route from the device's location to the provided destination(s) is found, or fails to be found for a reason indicated by the `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigationRouteDescription.html` and `NSError`. |

- `


  ### [-setDestinationsWithToken:completionHandler:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)setDestinationsWithToken:completionHandler:)


  ` Sets destinations for navigation using a route token returned by the Routes API. Uses the route
  as calculated by the Routes API, with adjustments as necessary to accommodate driver's start
  location and traffic conditions.
  Note

  Calls to `-setDestinationsWithToken:completionHandler:` clear the traveled path.

  #### Declaration

  Swift

      func setDestinationsWithToken(_ routeToken: String) async throws -> any NavigationRouteDescription

  Objective-C

      - (void)setDestinationsWithToken:(nonnull NSString *)routeToken
                     completionHandler:(nullable https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationRouteCompletionHandler.html)
                                           completionHandler;

  #### Parameters

  |---|---|
  | ` routeToken ` | A route token string returned by the Routes API. |
  | ` completionHandler ` | Operates asynchronously on the main queue to retrieve the route from the device's location to the destination(s). It either returns the route or returns an error when no route is found, with the reason for a failed route indicated in `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Protocols/GMSNavigationRouteDescription.html` and `NSError`. |

- `


  ### [-setDestinations:routeToken:callback:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)setDestinations:routeToken:callback:)


  ` Deprecated

  Use setDestinationsWithToken:completionHandler: instead.
  Sets multiple destinations for navigation, using a route token to navigate on a precomputed
  route. Routes will be the same, modulo changes to the driver starting location and to
  road/traffic conditions. Re-routes will still occur based on the routing options encoded in
  the token.

  Only `GMSNavigationTravelModeDriving` and `GMSNavigationTravelModeTwoWheeler`
  are supported when you use the route token to start a navigation session. Configure the travel
  mode by setting `travelMode.` The call will fail if the current travel mode is unsupported, and
  a `GMSRouteStatusTravelModeUnsupported` will be returned in the callback.
  Note

  Calls to `-setDestinations:routeToken:callback:` clear the traveled path.

  #### Declaration

  Swift

      func setDestinations(_ destinations: [https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html], routeToken: String, callback: @escaping https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteStatusCallback.html)

  Objective-C

      - (void)setDestinations:(nonnull NSArray<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html *> *)destinations
                   routeToken:(nonnull NSString *)routeToken
                     callback:(nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteStatusCallback.html)callback;

  #### Parameters

  |---|---|
  | ` destinations ` | An array of destination waypoints, should be the same as the destinations given to RoutesPreferred API to get the route token. |
  | ` routeToken ` | A route token string returned by RoutesPreferred API. Routing options specified in RoutesPreferred API are encoded in this route token, and will be used to regenerate the precomputed route or a new route when reroute happens. |
  | ` callback ` | Called asynchronously on the main queue when a route from the consumer's location to the provided destination(s) is found, or fails to be found for a reason indicated by the RouteStatus. |

- `


  ### [-getRouteInfoForDestination:withRoutingOptions:callback:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)getRouteInfoForDestination:withRoutingOptions:callback:)


  ` Returns route information based on the routing strategy: default best or shorter route. This
  method is only available to Mobility Services customers who are billed by Google on a
  per-transaction basis. Returns a `nil` value if the project lacks permission to call this API.

  #### Declaration

  Swift

      func getRouteInfo(forDestination destination: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html, with routingOptions: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationRoutingOptions.html, callback: @escaping https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteInfoCallback.html)

  Objective-C

      - (void)getRouteInfoForDestination:(nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html *)destination
                      withRoutingOptions:
                          (nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationRoutingOptions.html *)routingOptions
                                callback:(nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSRouteInfoCallback.html)callback;

  #### Parameters

  |---|---|
  | ` destination ` | The destination waypoint. |
  | ` routingOptions ` | The options used to fetch the route info. The routing strategy and alternate routes strategy are ignored since this method returns the route information for all routing strategies. |
  | ` callback ` | The callback called when routes information are received. |

- `


  ### [-continueToNextDestination](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)continueToNextDestination)


  ` Deprecated

  Use -continueToNextDestinationWithCompletion: instead.
  Deprecated. Use `continueToNextDestinationWithCompletion:` instead. This method may cause a
  server request to be issued under certain conditions, which has the potential to fail when
  network connectivity is poor. In the absence of a callback, callers of this method have no way to
  detect whether routing to the next destination succeeded or failed, nor at what point in time
  success or failure occurred.

  Pops the first destination from the current list of destinations. Following this call, guidance
  will be toward the next destination, if any.
  Note

  Calls to this method clear the traveled path.

  #### Declaration

  Swift

      func continueToNextDestination() -> https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html?

  Objective-C

      - (nullable https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html *)continueToNextDestination;

  #### Return Value

  the waypoint guidance is now heading towards, or `nil` if there are no more waypoints
  left.
- `


  ### [-continueToNextDestinationWithCompletion:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)continueToNextDestinationWithCompletion:)


  ` Pops the first destination from the current list of destinations. Following this call, guidance
  will be toward the next destination, if any.

  In the course of attempting to route to the next destination, this method may issue a server
  request under certain conditions, which has the potential to fail when network connectivity is
  poor. The completion block will be invoked asynchronously with a status reflecting the result of
  the attempt to route to the next destination, regardless of whether or not a server request was
  issued in the process. If a route was successfully found, the completion block will be invoked
  with a non-`nil` waypoint. If the attempt to route failed, the completion block will be invoked
  with an appropriate route status, and a non-`nil` waypoint will be returned if one is available.
  On failure, the waypoint may be `nil` in some cases, such as if this method is called before
  any of the `setDestinations:` methods have been called, or if there are no remaining destination
  waypoints.
  Note

  Calls to this method clear the traveled path.

  #### Declaration

  Swift

      @MainActor func continueToNextDestination() async -> (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html?, https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSRouteStatus.html)

  Objective-C

      - (void)continueToNextDestinationWithCompletion:
          (nullable https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSSetDestinationCompletionHandler.html)completion;

  #### Parameters

  |---|---|
  | ` completion ` | Called asynchronously on the main thread when a route from the consumer's location to the next destination is found, or fails to be found for a reason indicated by the `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSRouteStatus.html` parameter. |

- `


  ### [-clearDestinations](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)clearDestinations)


  ` Clears all previously set destinations and removes any calculated routes from the map. If
  guidance is active, this will automatically stop it.

  #### Declaration

  Swift

      func clearDestinations()

  Objective-C

      - (void)clearDestinations;

- `


  ### [avoidsHighways](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)avoidsHighways)


  ` Whether to avoid highways when generating routes to destinations. Defaults to NO.

  #### Declaration

  Swift

      var avoidsHighways: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL avoidsHighways;

- `


  ### [avoidsTolls](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)avoidsTolls)


  ` Whether to avoid toll roads when generating routes to destinations. Defaults to NO.

  #### Declaration

  Swift

      var avoidsTolls: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL avoidsTolls;

- `


  ### [avoidsFerries](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)avoidsFerries)


  ` Whether to avoid ferries when generating routes to destinations. Defaults to YES.

  #### Declaration

  Swift

      var avoidsFerries: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL avoidsFerries;

- `


  ### [licensePlateRestriction](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)licensePlateRestriction)


  ` Set license plate restriction with current driver's last digit of license plate and country
  code. This allows us to route around certain types of road restrictions which are based on
  license plate number. This will only apply to setDestinations calls made after this value is
  set. Ideally you'd set this immediately after getting the navigator.

  Set to nil if there is no license plate restriction. Default to nil.

  #### Declaration

  Swift

      var licensePlateRestriction: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationLicensePlateRestriction.html? { get set }

  Objective-C

      @property (nonatomic, nullable) https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationLicensePlateRestriction.html *licensePlateRestriction;

[## Guidance](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/Guidance)

- `


  ### [guidanceActive](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)guidanceActive)


  ` Whether turn-by-turn guidance is currently enabled. If guidanceActive is YES, but no route is
  currently available then guidance will start when a route becomes available. This property will
  be set to NO if clearDestinations is called, or we arrive at a waypoint.

  #### Declaration

  Swift

      var isGuidanceActive: Bool { get set }

  Objective-C

      @property (nonatomic, assign, unsafe_unretained, readwrite,
                getter=isGuidanceActive) BOOL guidanceActive;

- `


  ### [stopGuidanceAtArrival](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)stopGuidanceAtArrival)


  ` Whether guidance should automatically stop when `-navigator:didArriveAtWaypoint:` is called.

  When NO, the navigation header and footer will continue to be shown after arrival. The navigation
  header will continue to show the final guidance step and the navigation footer will continue to
  update the remaining time and distance until a time/distance of 0 is reached. Additionally,
  `-navigator:didUpdateRemainingTime` and `-navigator:didUpdateRemainingDistance` updates will
  continue. Explicitly set `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator.html#/c:objc(cs)GMSNavigator(py)guidanceActive` to NO to stop guidance and remaining time/distance
  updates.

  When YES, `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator.html#/c:objc(cs)GMSNavigator(py)guidanceActive` will automatically be set to NO upon arrival.

  Defaults to YES.

  #### Declaration

  Swift

      var stopGuidanceAtArrival: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL stopGuidanceAtArrival;

- `


  ### [timeUpdateThreshold](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)timeUpdateThreshold)


  ` The minimum change in estimated time to the next destination that will trigger the
  `-navigator:didUpdateRemainingTime:` method to be called.

  If this is set to `NSTimeIntervalMax`, then time update callbacks will be disabled. If this is
  set to a negative value, then the default threshold of one second will be used. Defaults to one
  second.
  Note
  This value is ignored if no listeners implement `navigator:didUpdateRemainingTime:`.

  #### Declaration

  Swift

      var timeUpdateThreshold: TimeInterval { get set }

  Objective-C

      @property (nonatomic) NSTimeInterval timeUpdateThreshold;

- `


  ### [distanceUpdateThreshold](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)distanceUpdateThreshold)


  ` The minimum change in estimated distance to the next destination that will trigger the
  `-navigator:didUpdateRemainingDistance:` method to be called.

  If this is set to `CLLocationDistanceMax`, then distance update callbacks will be disabled. If
  this is set to a negative value, then the default threshold of one meter will be used. Defaults
  to one meter.
  Note
  This value is ignored if no listeners implement `navigator:didUpdateRemainingDistance:`.

  #### Declaration

  Swift

      var distanceUpdateThreshold: CLLocationDistance { get set }

  Objective-C

      @property (nonatomic) CLLocationDistance distanceUpdateThreshold;

- `


  ### [timeToNextDestination](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)timeToNextDestination)


  ` Returns the estimated time to the next destination. This will be updated based on the current
  device position whilst guidance is active.

  #### Declaration

  Swift

      var timeToNextDestination: TimeInterval { get }

  Objective-C

      @property (nonatomic, readonly) NSTimeInterval timeToNextDestination;

  #### Return Value

  `CLTimeIntervalMax` if no route is available.
- `


  ### [distanceToNextDestination](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)distanceToNextDestination)


  ` Returns the estimated distance to the next destination. This will be updated based on the current
  device position whilst guidance is active.

  #### Declaration

  Swift

      var distanceToNextDestination: CLLocationDistance { get }

  Objective-C

      @property (nonatomic, readonly) CLLocationDistance distanceToNextDestination;

  #### Return Value

  `CLLocationDistanceMax` if no route is available.
- `


  ### [delayCategoryToNextDestination](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)delayCategoryToNextDestination)


  ` Returns the delay category to the next destination. This will be updated based on the current
  device position whilst guidance is active.

  #### Declaration

  Swift

      var delayCategoryToNextDestination: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationDelayCategory.html { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationDelayCategory.html delayCategoryToNextDestination;

  #### Return Value

  `GMSNavigationDelayCategoryNoData` if no route is available or traffic data is
  unavailable.
- `


  ### [-timeToWaypoint:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)timeToWaypoint:)


  ` Returns the estimated time to the given waypoint, or `CLTimeIntervalMax` if the waypoint is not
  part of the current route. This is updated based on the current device position while
  guidance is active.

  #### Declaration

  Swift

      func time(to waypoint: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html) -> TimeInterval

  Objective-C

      - (NSTimeInterval)timeToWaypoint:(nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html *)waypoint;

  #### Return Value

  `CLTimeIntervalMax` if the provided waypoint is not a destination in the current route.
- `


  ### [-distanceToWaypoint:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)distanceToWaypoint:)


  ` Returns the estimated distance to the given waypoint, or CLLocationDistanceMax if the waypoint is
  not part of the current route. This will be updated based on the current device position whilst
  guidance is active.

  #### Declaration

  Swift

      func distance(to waypoint: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html) -> CLLocationDistance

  Objective-C

      - (CLLocationDistance)distanceToWaypoint:
          (nonnull https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationWaypoint.html *)waypoint;

  #### Return Value

  `CLLocationDistanceMax` if the provided waypoint is not a destination in the current
  route.
- `


  ### [currentRouteLeg](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)currentRouteLeg)


  ` The current leg of the journey. This `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSRouteLeg.html` will have its starting position as the most
  recent known (road-snapped) position of the device.

  #### Declaration

  Swift

      var currentRouteLeg: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSRouteLeg.html? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSRouteLeg.html *currentRouteLeg;

- `


  ### [routeLegs](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)routeLegs)


  ` An array of route legs where each leg corresponds to a destination that was set.

  #### Declaration

  Swift

      var routeLegs: [https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSRouteLeg.html]? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) NSArray<https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSRouteLeg.html *> *routeLegs;

- `


  ### [traveledPath](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)traveledPath)


  ` The path that the user has traveled in the most recent guidance session, defined as the last time
  guidanceActive was set to YES. The path consists of road-snapped locations returned by the
  `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSRoadSnappedLocationProvider.html` and simplified to produce line segments. Note: The system polls
  the client for GPS signals to obtain location data. Poor GPS signal can result in further
  interpolation, which might produce less precise routes. This path is empty if guidance has never
  started.

  #### Declaration

  Swift

      var traveledPath: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSPath.html { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSPath.html *_Nonnull traveledPath;

[## Audio guidance](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/Audio-guidance)

- `


  ### [voiceGuidance](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)voiceGuidance)


  ` Determines whether voice guidance should be enabled for traffic and turn-by-turn alerts.

  Defaults to `GMSNavigationVoiceGuidanceAlertsAndGuidance`.

  #### Declaration

  Swift

      var voiceGuidance: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationVoiceGuidance.html { get set }

  Objective-C

      @property (nonatomic) https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationVoiceGuidance.html voiceGuidance;

- `


  ### [audioDeviceType](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)audioDeviceType)


  ` Determines what audio devices voice guidance may be played through.

  Defaults to `GMSVoiceGuidanceAudioDeviceTypeBluetooth`.

  #### Declaration

  Swift

      var audioDeviceType: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSVoiceGuidanceAudioDeviceType.html { get set }

  Objective-C

      @property (nonatomic) https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSVoiceGuidanceAudioDeviceType.html audioDeviceType;

- `


  ### [volumeLevel](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)volumeLevel)


  ` Determines the volume level for voice guidance.

  Defaults to the previously set volume level, or `GMSNavigationVolumeLevelNormal` if none
  has been set.

  #### Declaration

  Swift

      var volumeLevel: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationVolumeLevel.html { get set }

  Objective-C

      @property (nonatomic) https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationVolumeLevel.html volumeLevel;

- `


  ### [vibrationEnabled](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)vibrationEnabled)


  ` Determines whether the device should also vibrate when voice alerts are played.

  #### Declaration

  Swift

      var isVibrationEnabled: Bool { get set }

  Objective-C

      @property (nonatomic, assign, unsafe_unretained, readwrite,
                getter=isVibrationEnabled) BOOL vibrationEnabled;

- `


  ### [sendsBackgroundNotifications](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)sendsBackgroundNotifications)


  ` Determines whether UILocalNotifications containing guidance information will be presented when
  the app is in the background. Defaults to YES.

  #### Declaration

  Swift

      var sendsBackgroundNotifications: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL sendsBackgroundNotifications;

- `


  ### [suggestedLightingMode](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)suggestedLightingMode)


  ` The suggested lighting mode, based on the time of day and device location.

  #### Declaration

  Swift

      var suggestedLightingMode: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationLightingMode.html { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationLightingMode.html suggestedLightingMode;

- `


  ### [shouldDisplayPrompts](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)shouldDisplayPrompts)


  ` Determines whether prompts for traffic, better routes and incidents should be displayed.
  Defaults to YES.

  #### Declaration

  Swift

      var shouldDisplayPrompts: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL shouldDisplayPrompts;

- `


  ### [speedAlertOptions](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(py)speedAlertOptions)


  ` `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationSpeedAlertOptions.html` for customizing the triggering thresholds for
  `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationSpeedAlertSeverity.html`.

  You can use this property to customize the speed alert triggering thresholds in percentage for
  both minor and major alerts. You can also use this method to customize the time based triggering
  threshold for major speed alert.

  By setting nil, you won't receive any speeding feed data, and the NavSDK's default speed alert
  will display: speed alert shows red text when the speed is more than 5 mph or 10 kph over the
  speed limit, and shows white text and red background when speeding more than 10 mph or 20kph.

  #### Declaration

  Swift

      var speedAlertOptions: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationSpeedAlertOptions.html? { get set }

  Objective-C

      @property (nonatomic, nullable) https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigationSpeedAlertOptions.html *speedAlertOptions;

[## Transaction IDs](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/Transaction-IDs)

- `


  ### [-setTransactionIDs:errorHandler:](https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Classes/GMSNavigator#/c:objc(cs)GMSNavigator(im)setTransactionIDs:errorHandler:)


  ` Sets and logs to the server the ongoing transaction IDs that apply to the navigation events
  during the current navigation session. Transaction IDs will be cleared at the end of the
  navigation session. This method is only available to Mobility Services customers who are billed
  by Google on a per-transaction basis. Returns a `nil` value if the project lacks permission to
  call this API.

  #### Declaration

  Swift

      func setTransactionIDs(_ transactionIDs: [String], errorHandler: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationTransactionIDErrorHandler.html? = nil)

  Objective-C

      - (void)setTransactionIDs:(nonnull NSArray<NSString *> *)transactionIDs
                   errorHandler:
                       (nullable https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Type-Definitions/GMSNavigationTransactionIDErrorHandler.html)errorHandler;

  #### Parameters

  |---|---|
  | ` transactionIDs ` | The transaction IDs that apply to the current navigation session. The transaction ID must be unique for each billable transaction. An individual transaction ID must contain at least one and at most 64 characters. The list can be empty when a transaction has ended (but the session is still ongoing). |
  | ` errorHandler ` | A block that will be invoked asynchronously on the main thread if an error occurs when the transaction IDs are invalid. |