The core component of Navmii SDK responsible for route navigation is NMRouteNavigator. This class provides the API to control the route navigation process, to get navigation information and guidance updates. The class is also able to handle the rerouting and the rerouting by traffic.
...
NMSdk class contains the routeNavigator
property providing access to the instance of NMRouteNavigator. The route navigator instance can be accessed only after the SDK was started.
...
- route navigator performs navigation along the specified route. Route navigator gets GPS position updates internally, updates the route navigation state and notifies if any changes occur.
- route navigator is able to handle rerouting. This option is intended to ease handling the rerouting handling process for the SDK user. If rerouting handling is enabled, navigator, once rerouting is required, notified notifies that rerouting has started, calculates a new route, starts navigating along the new route and notifies that new route navigation has started.
- route navigator is able to handle rerouting by traffic. This option is intended to ease handing the rerouting by traffic handling process for the SDK user. If rerouting by traffic is enabled, navigator, once traffic has been updated, updates traffic on applies it to the current route (, if possible, or builds a new route if required)otherwise, builds alternative routes if possible, and notifies that new route navigation has started, traffic was updated and alternative routes are available.
- route navigator is able to visualize the changes in route being navigated by emitting route visualizer requests once visualization data is updated. To achieve such a behaviour you need to connect the route visualizer (
routeVisualizer
property of NMSdk) to route navigator usingaddRouteVisualizerRequestListener:
method of NMRouteNavigator.
ROUTE NAVIGATION
Route navigation starts by calling the startNavigatingTheRoute:
method. The route
parameter is an NMRoute class instance which represents the route to navigate. The source of routes is Routing Service. After the route navigation was started, route navigator gets GPS position updates internally, updates the route navigation state and notifies if any changes occur. Those notifications can be gotten by conforming to NMRouteNavigationListener protocol. Notifications about the following events are available:
...