DynamicRoutingDelegate
public protocol DynamicRoutingDelegate : AnyObject
This protocol should be implemented in order to
receive notifications about the new route via the DynamicRoutingEngine.
-
This event is issued when a better route could be found, as defined by
DynamicRoutingEngineOptions. To find a better route, two routes are calculated. The updated current route: A route that is calculated via the route specified. The dynamic route: A route that starts at the current position on the route specified and passes through the remaining waypoints.Declaration
Swift
func onBetterRouteFound(newRoute: Route, etaDifferenceInSeconds: Int32, distanceDifferenceInMeters: Int32)Parameters
newRouteThe newly calculated route with the remaining waypoints starting from the current location.
etaDifferenceInSecondsThe difference in seconds: eta of the current updated route - eta of the dynamic route.
distanceDifferenceInMetersThe difference in meters: distance of the current updated route - distance of the dynamic route. The value can be negative in case the current updated route has a shorter distance, but its now assumed to be longer than the dynamic route.
-
This event is issued when an error occurred.
Declaration
Swift
func onRoutingError(routingError: RoutingError)Parameters
routingErrorRouting error