MQNavigationManager

@interface MQNavigationManager : NSObject

The central object for managing Navigation-related activities for your app

  • The object that acts as the prompt delegate of the navigation manager The delegate must adopt the MQNavigationManagerPromptDelegate protocol. The delegate is not retained.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable)
        NSObject<MQNavigationManagerPromptDelegate> *promptDelegate;

    Swift

    weak var promptDelegate: MQNavigationManagerPromptDelegate? { get set }
  • The object that acts as the delegate of the navigation manager The delegate must adopt the MQNavigationManagerDelegate protocol. The delegate is not retained.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable)
        NSObject<MQNavigationManagerDelegate> *delegate;

    Swift

    weak var delegate: MQNavigationManagerDelegate? { get }
  • The current route that the navigation manager has and is navigating on

    Declaration

    Objective-C

    @property (readonly, atomic, nullable) MQRoute *route;

    Swift

    var route: MQRoute? { get }
  • Method to check if the navigation manager is stopped or not

    Declaration

    Objective-C

    @property (readonly, atomic) BOOL isStopped;

    Swift

    var isStopped: Bool { get }

    Return Value

    boolean Value representing whether the navigation manager is stopped or not

  • Method to check the state of navigation manager

    Declaration

    Objective-C

    @property (readonly, atomic) MQNavigationManagerState navigationManagerState;

    Swift

    var navigationManagerState: MQNavigationManagerState { get }
  • Returns current route leg the user is on

    @returns current leg

    Declaration

    Objective-C

    @property (readonly, atomic, nullable) MQRouteLeg *currentRouteLeg;

    Swift

    var currentRouteLeg: MQRouteLeg? { get }
  • Users must be prompted to provide consent for location tracking. A MQUserLocationTrackingConsentStatus of either Granted or Denied must be set before navigation can start. A MQUserLocationTrackingConsentStatus of Awaiting is not allowed to be set (protected by assertion)

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        MQUserLocationTrackingConsentStatus userLocationTrackingConsentStatus;

    Swift

    var userLocationTrackingConsentStatus: MQUserLocationTrackingConsentStatus { get set }
  • Init method to create instance of MQNavigationManager

    Declaration

    Objective-C

    - (nullable instancetype)
    initWithDelegate:(nonnull NSObject<MQNavigationManagerDelegate> *)delegate
      promptDelegate:
          (nullable NSObject<MQNavigationManagerPromptDelegate> *)promptDelegate;

    Swift

    init?(delegate: MQNavigationManagerDelegate, promptDelegate: MQNavigationManagerPromptDelegate?)

    Parameters

    delegate

    object that conforms to MQNavigationManagerDelegate. Navigation manager will use this object to communicate with the host app.

    promptDelegate

    object that conforms to MQNavigationManagerPromptDelegate. Navigation manager will use this object to communicate with the host app

    Return Value

    instance of MQNavigationManager

  • This method is unavailable. Use initWithDelegate:promptDelegate: instead

    Declaration

    Objective-C

    + (instancetype _Nonnull) new;

    Return Value

    nothing; this method is unavailable

  • This method is unavailable. Use initWithDelegate:promptDelegate: instead

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;

    Return Value

    nothing; this method is unavailable

  • Starts navigation along the supplied route. MQNavigationManager may need to make additional service requests in order to actually begin navigation. As a result, don’t consider navigation to be started until the delegate has received a navigationManagerDidStartNavigation: call.

    Declaration

    Objective-C

    - (void)startNavigationWithRoute:(nonnull MQRoute *)route;

    Swift

    func startNavigation(with route: MQRoute)

    Parameters

    route

    object of type MQRoute

  • Stops navigation and resets all navigation state

    Declaration

    Objective-C

    - (void)cancelNavigation;

    Swift

    func cancelNavigation()
  • Pauses the navigation. call resumeNavigation when ready to resume.

    Declaration

    Objective-C

    - (void)pauseNavigation;

    Swift

    func pauseNavigation()
  • Resumes the navigation from paused state.

    Warning

    This method should be called only after pausing navigation.

    Declaration

    Objective-C

    - (void)resumeNavigation;

    Swift

    func resumeNavigation()
  • Advances to the next leg of a multi-stop route. On a single destination route, does nothing.

    Warning

    This method should be called only during the navigating or paused state.

    Declaration

    Objective-C

    - (BOOL)advanceRouteToNextLeg;

    Swift

    func advanceRouteToNextLeg() -> Bool

    Return Value

    Returns if advancing was successful