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 (readwrite, nonatomic, nullable) NSObject<MQNavigationManagerDelegate> *delegate;
Swift
weak var delegate: MQNavigationManagerDelegate? { get set }
-
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 }
-
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 thenavigating
orpaused
state.Declaration
Objective-C
- (BOOL)advanceRouteToNextLeg;
Swift
func advanceRouteToNextLeg() -> Bool
Return Value
Returns if advancing was successful