# GoogleNavigation Framework Reference

# GMSNavigationRoutingOptions

    @interface GMSNavigationRoutingOptions : NSObject <NSCopying, NSMutableCopying>

An immutable class that contains options related to routing logic (e.g., routing strategy).
- `


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


  ` Specifies the ranking order of routes, either by time, or by distance.

  #### Declaration

  Swift

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

  Objective-C

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

- `


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


  ` The alternate routes strategy used when setting destinations.

  #### Declaration

  Swift

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

  Objective-C

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

- `


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


  ` An array of target distances. A target distance is used to rank routes to a destination by the
  absolute delta to it from smallest to largest. The elements should be non-negative integers.
  Don't set `https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationAlternateRoutesStrategy.html` and this field at the same time.
  Target distance is only supported for the first destination for now. So only put one
  positive integer in the array. If the first element is not a positive integer, the
  routing strategy defaults to the best routing strategy.

  #### Declaration

  Swift

      var targetDistancesMeters: [NSNumber]? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) NSArray<NSNumber *> *targetDistancesMeters;

- `


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


  ` Initializes the routing options with routing strategy.

  #### Declaration

  Swift

      init(routingStrategy: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationRoutingStrategy.html)

  Objective-C

      - (nonnull instancetype)initWithRoutingStrategy:
          (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationRoutingStrategy.html)routingStrategy;

  #### Parameters

  |---|---|
  | ` routingStrategy ` | Routing strategy that specifies the order of returned routes. |

- `


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


  ` Initializes the routing options with an alternate routes strategy.

  #### Declaration

  Swift

      init(alternateRoutesStrategy: https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationAlternateRoutesStrategy.html)

  Objective-C

      - (nonnull instancetype)initWithAlternateRoutesStrategy:
          (https://developers.google.com/maps/documentation/navigation/ios-sdk/reference/objc/Enums/GMSNavigationAlternateRoutesStrategy.html)alternateRoutesStrategy;

  #### Parameters

  |---|---|
  | ` alternateRoutesStrategy ` | Alternate routes strategy that determines the number of returned alternate routes. |

- `


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


  ` Initializes the routing options with target distances, and sets the routing strategy to
  `GMSNavigationRoutingStrategyDeltaToTargetDistance`. Ensure that target distances are always
  up-to-date when used.

  #### Declaration

  Swift

      init(targetDistancesMeters: [NSNumber])

  Objective-C

      - (nonnull instancetype)initWithTargetDistancesMeters:
          (nonnull NSArray<NSNumber *> *)targetDistancesMeters;

  #### Parameters

  |---|---|
  | ` targetDistancesMeters ` | Target distances for destinations. Each target distance is used to rank the routes to its corresponding destination by its absolute delta to the routes. |