GoogleNavigation Framework Reference
GMSNavigationRoutingStrategy
enum GMSNavigationRoutingStrategy : NSInteger {}
The routing strategy specifies how routes are ranked, which affects the route when it is chosen
and during re-routing. The default value is GMSNavigationRoutingStrategyDefaultBest
.
-
Ranks routes by NavSDK default cost model. This is the default routing strategy for navigating.
Declaration
Swift
case defaultBest = 0
Objective-C
GMSNavigationRoutingStrategyDefaultBest = 0
-
Ranks routes by distance. The highest ranking route is the shortest of those returned.
Declaration
Objective-C
GMSNavigationRoutingStrategyShorter
-
Ranks routes by absolute delta to a target distance, from smallest to largetest
Declaration
Swift
case deltaToTargetDistance = 2
Objective-C
GMSNavigationRoutingStrategyDeltaToTargetDistance
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 2024-11-15 UTC.
[null,null,["Last updated 2024-11-15 UTC."],[[["`GMSNavigationRoutingStrategy` is an enum used to define how routes are ranked during navigation and re-routing."],["The default routing strategy, `GMSNavigationRoutingStrategyDefaultBest`, uses NavSDK's default cost model to rank routes."],["`GMSNavigationRoutingStrategyShorter` prioritizes the shortest route based on distance."],["`GMSNavigationRoutingStrategyDeltaToTargetDistance` ranks routes based on their absolute difference from a target distance."]]],["The `GMSNavigationRoutingStrategy` enum defines how routes are ranked during navigation and re-routing. `GMSNavigationRoutingStrategyDefaultBest` ranks routes using the NavSDK's default cost model and is the default setting. `GMSNavigationRoutingStrategyShorter` prioritizes the shortest route based on distance. `GMSNavigationRoutingStrategyDeltaToTargetDistance` ranks routes by the difference to a target distance, from smallest to largest difference. Each strategy is assigned a unique integer value in both Swift and Objective-C.\n"]]