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 GMSNavigationAlternateRoutesStrategy 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.
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.
Target distances for destinations. Each target distance is
used to rank the routes to its corresponding destination by its absolute delta to
the routes.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-15 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSNavigationRoutingOptions\u003c/code\u003e is an immutable class used to define routing logic preferences, such as route ranking and alternate route generation, in navigation.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can specify routing strategies based on time or distance, control the number of alternate routes, and even set target distances for route ranking.\u003c/p\u003e\n"],["\u003cp\u003eInitialization methods allow for setting the desired routing behavior using \u003ccode\u003eGMSNavigationRoutingStrategy\u003c/code\u003e, \u003ccode\u003eGMSNavigationAlternateRoutesStrategy\u003c/code\u003e, or target distances.\u003c/p\u003e\n"],["\u003cp\u003eWhen using target distances for route ranking, it's crucial to keep them updated for optimal results, and currently, target distance is only supported for the first destination.\u003c/p\u003e\n"]]],[],null,["GMSNavigationRoutingOptions \n\n @interface GMSNavigationRoutingOptions : NSObject \u003cNSCopying, NSMutableCopying\u003e\n\nAn immutable class that contains options related to routing logic (e.g., routing strategy).\n- `\n ``\n ``\n `\n\n [routingStrategy](#/c:objc(cs)GMSNavigationRoutingOptions(py)routingStrategy)`\n ` \n Specifies the ranking order of routes, either by time, or by distance. \n\n Declaration \n Swift \n\n var routingStrategy: ../Enums/GMSNavigationRoutingStrategy.html { get }\n\n Objective-C \n\n @property (nonatomic, readonly) ../Enums/GMSNavigationRoutingStrategy.html routingStrategy;\n\n- `\n ``\n ``\n `\n\n [alternateRoutesStrategy](#/c:objc(cs)GMSNavigationRoutingOptions(py)alternateRoutesStrategy)`\n ` \n The alternate routes strategy used when setting destinations. \n\n Declaration \n Swift \n\n var alternateRoutesStrategy: ../Enums/GMSNavigationAlternateRoutesStrategy.html { get }\n\n Objective-C \n\n @property (nonatomic, readonly) ../Enums/GMSNavigationAlternateRoutesStrategy.html alternateRoutesStrategy;\n\n- `\n ``\n ``\n `\n\n [targetDistancesMeters](#/c:objc(cs)GMSNavigationRoutingOptions(py)targetDistancesMeters)`\n ` \n An array of target distances. A target distance is used to rank routes to a destination by the\n absolute delta to it from smallest to largest. The elements should be non-negative integers.\n Don't set [GMSNavigationAlternateRoutesStrategy](../Enums/GMSNavigationAlternateRoutesStrategy.html) and this field at the same time.\n Target distance is only supported for the first destination for now. So only put one\n positive integer in the array. If the first element is not a positive integer, the\n routing strategy defaults to the best routing strategy. \n\n Declaration \n Swift \n\n var targetDistancesMeters: [NSNumber]? { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) NSArray\u003cNSNumber *\u003e *targetDistancesMeters;\n\n- `\n ``\n ``\n `\n\n [-initWithRoutingStrategy:](#/c:objc(cs)GMSNavigationRoutingOptions(im)initWithRoutingStrategy:)`\n ` \n Initializes the routing options with routing strategy. \n\n Declaration \n Swift \n\n init(routingStrategy: ../Enums/GMSNavigationRoutingStrategy.html)\n\n Objective-C \n\n - (nonnull instancetype)initWithRoutingStrategy:\n (../Enums/GMSNavigationRoutingStrategy.html)routingStrategy;\n\n Parameters\n\n |-------------------------|---------------------------------------------------------------|\n | ` `*routingStrategy*` ` | Routing strategy that specifies the order of returned routes. |\n\n- `\n ``\n ``\n `\n\n [-initWithAlternateRoutesStrategy:](#/c:objc(cs)GMSNavigationRoutingOptions(im)initWithAlternateRoutesStrategy:)`\n ` \n Initializes the routing options with an alternate routes strategy. \n\n Declaration \n Swift \n\n init(alternateRoutesStrategy: ../Enums/GMSNavigationAlternateRoutesStrategy.html)\n\n Objective-C \n\n - (nonnull instancetype)initWithAlternateRoutesStrategy:\n (../Enums/GMSNavigationAlternateRoutesStrategy.html)alternateRoutesStrategy;\n\n Parameters\n\n |---------------------------------|------------------------------------------------------------------------------------|\n | ` `*alternateRoutesStrategy*` ` | Alternate routes strategy that determines the number of returned alternate routes. |\n\n- `\n ``\n ``\n `\n\n [-initWithTargetDistancesMeters:](#/c:objc(cs)GMSNavigationRoutingOptions(im)initWithTargetDistancesMeters:)`\n ` \n Initializes the routing options with target distances, and sets the routing strategy to\n `GMSNavigationRoutingStrategyDeltaToTargetDistance`. Ensure that target distances are always\n up-to-date when used. \n\n Declaration \n Swift \n\n init(targetDistancesMeters: [NSNumber])\n\n Objective-C \n\n - (nonnull instancetype)initWithTargetDistancesMeters:\n (nonnull NSArray\u003cNSNumber *\u003e *)targetDistancesMeters;\n\n Parameters\n\n |-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*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. |"]]