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

    transportMode

    Updates the transport mode for the route.

  • Constructs a RefreshRouteOptions object with CarOptions.

    Declaration

    Swift

    public init(_ carOptions: CarOptions)

    Parameters

    carOptions

    Converts the route to a car route, if a different transport mode was used for the RouteHandle. Note that in case this is not possible, an RoutingError.noRouteFound error will be triggered.

  • Constructs a RefreshRouteOptions object with TruckOptions.

    Declaration

    Swift

    public init(_ truckOptions: TruckOptions)

    Parameters

    truckOptions

    Converts the route to a truck route, if a different transport mode was used for the RouteHandle. Note that in case this is not possible, an RoutingError.noRouteFound error will be triggered.

  • Constructs a RefreshRouteOptions object with PedestrianOptions.

    Declaration

    Swift

    public init(_ pedestrianOptions: PedestrianOptions)

    Parameters

    pedestrianOptions

    Converts the route to a pedestrian route, if a different transport mode was used for the RouteHandle. Note that in case this is not possible, an RoutingError.noRouteFound error will be triggered.

  • Constructs a RefreshRouteOptions object with ScooterOptions.

    Declaration

    Swift

    public init(_ scooterOptions: ScooterOptions)

    Parameters

    scooterOptions

    Converts the route to a scooter route, if a different transport mode was used for the RouteHandle. Note that in case this is not possible, an RoutingError.noRouteFound error will be triggered.

  • Constructs a RefreshRouteOptions object with TaxiOptions.

    Declaration

    Swift

    public init(_ taxiOptions: TaxiOptions)

    Parameters

    taxiOptions

    Converts the route to a taxi route, if a different transport mode was used for the RouteHandle. Note that in case this is not possible, an RoutingError.noRouteFound error will be triggered.

  • Constructs a RefreshRouteOptions object with EVCarOptions.

    Declaration

    Swift

    public init(_ evCarOptions: EVCarOptions)

    Parameters

    evCarOptions

    Converts 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, an RoutingError.noRouteFound error will be triggered.

  • Constructs a RefreshRouteOptions object with EVTruckOptions.

    Declaration

    Swift

    public init(_ evTruckOptions: EVTruckOptions)

    Parameters

    evTruckOptions

    Converts 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, an RoutingError.noRouteFound error will be triggered.

  • Constructs a RefreshRouteOptions object with BicycleOptions.

    Declaration

    Swift

    public init(_ bicycleOptions: BicycleOptions)

    Parameters

    bicycleOptions

    Converts the route to a bicycle route, if a different transport mode was used for the RouteHandle. Note that in case this is not possible, an RoutingError.noRouteFound error will be triggered.

  • Constructs a RefreshRouteOptions object with BusOptions.

    Declaration

    Swift

    public init(_ busOptions: BusOptions)

    Parameters

    busOptions

    Converts the route to a bus route, if a different transport mode was used for the RouteHandle. Note that in case this is not possible, an RoutingError.noRouteFound error will be triggered.

  • Constructs a RefreshRouteOptions object with PrivateBusOptions.

    Declaration

    Swift

    public init(_ privateBusOptions: PrivateBusOptions)

    Parameters

    privateBusOptions

    Converts 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, an RoutingError.noRouteFound error will be triggered.