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

    isRoutingModeOn

    indicates if routing is on

    latestRouteResponse

    the last route response received

  • This function will be called when a routing instruction has been received.

    Declaration

    Swift

    func onRouteInstructionReceived(routeNode: MNRouteNode)

    Parameters

    routeNode

    The 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

    currentRouteSegment

    The route segment user is currently on

    visitedRouteSegments

    List of route segments user has already visited prior to the current segment as part of the current routing request/response

    upcomingRouteSegments

    List 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

    newRouteResponse

    the new route response from server.

  • This function will be called when destination is reached.

    Declaration

    Swift

    func onDestinationReached(destinationEntityId: NSInteger)

    Parameters

    destinationEntityId

    the entity id of destination.