MNRoutingDelegate
public protocol MNRoutingDelegate : AnyObject
-
This function will be called when a routing response has been received.
Declaration
Swift
func onRouteResponse(_ response: MNRouteResponse)
Parameters
response
the 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
nextKeyPoint
the 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
nextKeyPoint
the next route keypoint received from server.
routeIndex
index of smoothed route
-
This function will be called when routing status changes.
Declaration
Swift
func onRoutingStatus(isRoutingModeOn: Bool, latestRouteResponse: MNRouteResponse)
Parameters
isRoutingModeOn
indicates if routing is on
latestRouteResponse
the last route response received
-
This function will be called on route recalculation.
Declaration
Swift
func onRouteRecalculation(newRouteResponse: MNRouteResponse)
Parameters
newRouteResponse
the new route response from server.
-
This function will be called when destination is reached.
Declaration
Swift
func onDestinationReached(waypoint: MapstedWaypoint)
Parameters
destinationEntityId
the 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)