RoutingStatusCallback
public protocol RoutingStatusCallback
Listener to routing status events
-
This function will be called when routing status changes.
Declaration
Swift
func onRoutingStatus(isRoutingModeOn: Bool, latestRouteResponse: MNRouteResponse)Parameters
isRoutingModeOnindicates if routing is on
latestRouteResponsethe last route response received
-
This function will be called when a routing instruction has been received.
Declaration
Swift
func onRouteInstructionReceived(routeNode: MNRouteNode, nextRouteNode: MNRouteNode?)Parameters
routeNodeThe route node this instruction applies to
-
This function will be called when segment is reached.
Declaration
Swift
func onRouteSegmentReached(currentRouteSegment: MNRouteSegment, visitedRouteSegments: [MNRouteSegment], upcomingRouteSegments: [MNRouteSegment])Parameters
currentRouteSegmentThe route segment user is currently on
visitedRouteSegmentsList of route segments user has already visited prior to the current segment as part of the current routing request/response
upcomingRouteSegmentsList of route segments user is yet to visit after the current segment as part of the current routing request/response
-
This function will be called when routing progress updated.
Declaration
Swift
func onUserProgressAlongRoute(routeUserProgress: MNRouteUserProgress) -
This function will be called on route recalculation.
Declaration
Swift
func onRouteRecalculation(newRouteResponse: MNRouteResponse)Parameters
newRouteResponsethe new route response from server.
-
This function will be called when destination is reached.
Declaration
Swift
func onDestinationReached(waypoint: MapstedWaypoint)Parameters
destinationEntityIdthe entity id of destination.
RoutingStatusCallback Protocol Reference