RefreshRouteOptions
public class RefreshRouteOptions
extension RefreshRouteOptions: NativeBase
extension RefreshRouteOptions: Hashable
The options to specify how to refresh an already calculated route identified by a RouteHandle. All the
options that may result in a new route shape are ignored as no new route is calculated. Instead, only the data that
accompanies a route, such as traffic information, can be refreshed. Therefore, the following route options are ignored:
RouteOptions.alternatives, RouteOptions.arrivalTime, and RouteOptions.optimizationMode.
If new AvoidanceOptions are specified, they are ignored as well and instead new SectionNotice‘s
are generated that indicate where the requested AvoidanceOptions are violated. Note that when
EVCarOptions.ensureReachability is set to true, the route refresh request will fail as this option
is incompatible with a fixed route shape.
If any of the ignored options are important, consider calculating a new route instead.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
Constructs a RefreshRouteOptions object with
TransportMode.Declaration
Swift
public init(_ transportMode: TransportMode)Parameters
transportModeUpdates the transport mode for the route.
-
Constructs a RefreshRouteOptions object with
CarOptions.Declaration
Swift
public init(_ carOptions: CarOptions)Parameters
carOptionsConverts the route to a car route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered. -
Constructs a RefreshRouteOptions object with
TruckOptions.Declaration
Swift
public init(_ truckOptions: TruckOptions)Parameters
truckOptionsConverts the route to a truck route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered. -
Constructs a RefreshRouteOptions object with
PedestrianOptions.Declaration
Swift
public init(_ pedestrianOptions: PedestrianOptions)Parameters
pedestrianOptionsConverts the route to a pedestrian route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered. -
Constructs a RefreshRouteOptions object with
ScooterOptions.Declaration
Swift
public init(_ scooterOptions: ScooterOptions)Parameters
scooterOptionsConverts the route to a scooter route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered. -
Constructs a RefreshRouteOptions object with
TaxiOptions.Declaration
Swift
public init(_ taxiOptions: TaxiOptions)Parameters
taxiOptionsConverts the route to a taxi route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered. -
Constructs a RefreshRouteOptions object with
EVCarOptions.Declaration
Swift
public init(_ evCarOptions: EVCarOptions)Parameters
evCarOptionsConverts the route to an electric car route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered. -
Constructs a RefreshRouteOptions object with
EVTruckOptions.Declaration
Swift
public init(_ evTruckOptions: EVTruckOptions)Parameters
evTruckOptionsConverts the route to an electric truck route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered. -
Constructs a RefreshRouteOptions object with
BicycleOptions.Declaration
Swift
public init(_ bicycleOptions: BicycleOptions)Parameters
bicycleOptionsConverts the route to a bicycle route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered. -
Constructs a RefreshRouteOptions object with
BusOptions.Declaration
Swift
public init(_ busOptions: BusOptions)Parameters
busOptionsConverts the route to a bus route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered. -
Constructs a RefreshRouteOptions object with
PrivateBusOptions.Declaration
Swift
public init(_ privateBusOptions: PrivateBusOptions)Parameters
privateBusOptionsConverts the route to a private bus route, if a different transport mode was used for the
RouteHandle. Note that in case this is not possible, anRoutingError.noRouteFounderror will be triggered.