MNRoutingDelegate
public protocol MNRoutingDelegate : AnyObject
-
This function will be called when a routing response has been received.
Declaration
Swift
func onRouteResponse(_ response: MNRouteResponse)Parameters
responsethe routing response received from server.
-
This function will be called when a routing instruction has been received.
Declaration
Swift
func onRouteInstruction(nextKeyPoint: MNRouteNode, afterNextKeyPoint: MNRouteNode?)Parameters
nextKeyPointthe next route keypoint received from server.
-
This function will be called when a routing instruction has been received.
Declaration
Swift
func onRouteInstruction(nextKeyPoint: MNRouteNode, routeIndex: Int)Parameters
nextKeyPointthe next route keypoint received from server.
routeIndexindex of smoothed route
-
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 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.
-
This function will be called when segment is reached.
Declaration
Swift
func onRouteSegmentReached(currentRouteSegment: MNRouteSegment, visitedRouteSegments: [MNRouteSegment], upcomingRouteSegments: [MNRouteSegment]) -
This function will be called when routing progress updated.
Declaration
Swift
func onUserProgressAlongRoute(routeUserProgress: MNRouteUserProgress)
MNRoutingDelegate Protocol Reference