RoutingControllerInterface

public protocol RoutingControllerInterface
  • Request a route. This process is done on backend. It will take some time depending on request size to get the response.

    Declaration

    Swift

    func requestRoute(request: MNRouteRequest, routingRequestCallback: RoutingRequestCallback)

    Parameters

    request

    a request object indicating all the destinations of the route and whether it should route by order or calculate the shorest path.

  • Start navigation.

    Calling this function will start the navigation process inside core library. It will notify when turn by turn instruction received, if reach destination, or if recalculating routing is necessary.

    Declaration

    Swift

    func startNavigation(route: MNRoute, routingStatusCallback: RoutingStatusCallback)

    Parameters

    route

    The route to start navigation for

    routingStatusCallback

    Callback for notification as routing status changes

  • Stop navigation.

    Calling this function will stop navigation process.

    Declaration

    Swift

    func stopNavigation()
  • Gets distance and time to a search entity from start to destination with routeOptions

    Declaration

    Swift

    func requestEstimate(start: MNSearchEntity,
    					 destination: MNSearchEntity, routeOptions: MNRouteOptions, completion: @escaping ((MNRouteDistanceTime?) -> Void))

    Parameters

    start

    Starting point for route

    destination

    Destination point for route

    routeOptions

    The current route options

    completion

    A callback closure with the route distance and time

  • Gets distance and time to a search entity from current location.

    Declaration

    Swift

    func requestEstimateFromCurrentLocation(destination: MNSearchEntity, routeOptions: MNRouteOptions, completion: @escaping ((MNRouteDistanceTime?) -> Void))

    Parameters

    destination

    Search entity whose distance/time to compute

    routeOptions

    The current route options

    completion

    A callback closure with the route distance and time

  • Gets distance and time to a mercator zone from current location.

    Declaration

    Swift

    func requestEstimateFromCurrentLocation(toMercatorZone mercatorZone: MNMercatorZone, routeOptions: MNRouteOptions, completion: @escaping ((MNRouteDistanceTime?) -> Void))

    Parameters

    toMercatorZone

    the MercatorZone to calculate distance to

    routeOptions

    The current route options

    completion

    A callback closure with the route distance and time

  • Gets distance and time to an entity zone from current location.

    Declaration

    Swift

    func requestEstimateFromCurrentLocation(toEntityZone entityZone: MNEntityZone, routeOptions: MNRouteOptions, completion: @escaping ((MNRouteDistanceTime?) -> Void))

    Parameters

    toEntityZone

    the Entity Zone to calculate distance to

    routeOptions

    The current route options

    completion

    A callback closure with the route distance and time

  • Declaration

    Swift

    func fetchDestinationInstructionEntity(propertyId: Int) -> DestinationInstructionsEntity?
  • Declaration

    Swift

    func fetchEntityFromDestinationInstructions(entityId: Int, buildingId: Int, propertyId: Int) -> RoutingMessageEntity?