Overview
A mutable class that contains options related to routing logic (e.g., routing strategy).
Inherits GMSNavigationRoutingOptions.
Public Member Functions | |
(instancetype) | - initWithRoutingStrategy: |
Initializes the routing options with routing strategy. | |
(instancetype) | - initWithAlternateRoutesStrategy: |
Initializes the routing options with an alternate routes strategy. | |
(instancetype) | - initWithTargetDistancesMeters: |
Initializes the routing options with target distances, and sets the routing strategy to GMSNavigationRoutingStrategyDeltaToTargetDistance. | |
Properties | |
GMSNavigationRoutingStrategy | routingStrategy |
Specifies the ranking order of routes, either by time, or by distance. | |
GMSNavigationAlternateRoutesStrategy | alternateRoutesStrategy |
The alternate routes strategy used when setting destinations. | |
NSArray< NSNumber * > * | targetDistancesMeters |
Target distances used to ranking the routes. |
Member Function Documentation
- (instancetype) initWithRoutingStrategy: | (GMSNavigationRoutingStrategy) | routingStrategy |
Initializes the routing options with routing strategy.
- Parameters:
-
routingStrategy Routing strategy that specifies the order of returned routes.
- (instancetype) initWithAlternateRoutesStrategy: | (GMSNavigationAlternateRoutesStrategy) | alternateRoutesStrategy |
Initializes the routing options with an alternate routes strategy.
- Parameters:
-
alternateRoutesStrategy Alternate routes strategy that determines the number of returned alternate routes.
- (instancetype) initWithTargetDistancesMeters: | (NSArray< NSNumber * > *) | targetDistancesMeters |
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.
- 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.
Property Documentation
- (GMSNavigationRoutingStrategy) routingStrategy [read, write, assign] |
Specifies the ranking order of routes, either by time, or by distance.
Implements GMSNavigationRoutingOptions.
- (GMSNavigationAlternateRoutesStrategy) alternateRoutesStrategy [read, write, assign] |
The alternate routes strategy used when setting destinations.
Implements GMSNavigationRoutingOptions.
- (NSArray<NSNumber *>*) targetDistancesMeters [read, write, copy] |
Target distances used to ranking the routes.
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.
Implements GMSNavigationRoutingOptions.