Type Definitions

The following type definitions are available globally.

  • Callback to MQNavigationManager to accept that we’ve reached a destination

    Declaration

    Objective-C

    typedef void (^MQConfirmArrivalBlock)(BOOL)

    Swift

    typealias MQConfirmArrivalBlock = (Bool) -> Void

    Parameters

    didArrive

    Accept the arrival of the destination. If accepted the NavigationManager will continue to the next destination or if reaching the final destination, stop navigation

  • MQNavigationRoutePosition Type used to represent a position on route

    Declaration

    Objective-C

    typedef double MQNavigationRoutePosition

    Swift

    typealias MQNavigationRoutePosition = Double
  • Completion block returning a set of routes or an error

    Declaration

    Objective-C

    typedef void (^MQRouteResponseCompletionBlock)(NSArray<MQRoute *> *_Nullable,
                                                   NSError *_Nullable)

    Swift

    typealias MQRouteResponseCompletionBlock = ([MQRoute]?, Error?) -> Void

    Parameters

    routeResponse

    optional Array of routes

    error

    optional Error object

  • Completion block returning an optimized route summary from the requestRouteSummaryWithStartLocation method.

    Declaration

    Objective-C

    typedef void (^MQSummaryResponseCompletionBlock)(MQEstimatedTimeOfArrival *,
                                                     MQTrafficOverview,
                                                     CLLocationDistance,
                                                     NSError *_Nullable)

    Swift

    typealias MQSummaryResponseCompletionBlock = (MQEstimatedTimeOfArrival?, MQTrafficOverview, CLLocationDistance, Error?) -> Void

    Parameters

    estimatedTimeOfArrival

    optional Estimated Time of Arrival

    trafficConditions

    optional Traffic conditions. Set to MQTrafficOverviewUnknown if unknown.

    routeLength

    The route length

    error

    optional Error object