Android Map Libre Navigation
A Android platform specific wrapper for MapLibreNavigation.
You can also use MapLibreNavigation directly, but this leads to more configuration.
Currently the only difference is, that the location engine is created depending on your dependencies.
Constructors
Properties
Navigation needs an instance of location engine in order to acquire user location information and handle events based off of the current information. By default, a LOST location engine is created with the optimal navigation settings.
Functions
This adds a new faster route listener which is invoked when a new, faster DirectionsRoute has been retrieved by the specified criteria in FasterRoute.
Navigation Milestones provide a powerful way to give your user instructions at custom defined locations along their route. Default milestones are automatically added unless MapLibreNavigationOptions.defaultMilestonesEnabled is set to false but they can also be individually removed using the .removeMilestone API. Once a custom milestone is built, it will need to be passed into the navigation SDK through this method.
This adds a new milestone event listener which is invoked when a milestone gets triggered. If more then one milestone gets triggered on a location update, each milestone event listener will be invoked for each of those milestones. This is important to consider if you are using voice instructions since this would cause multiple instructions to be said at once. Ideally the milestones setup should avoid triggering too close to each other.
Adds the given list of Milestone to be triggered during navigation.
This adds a new navigation event listener which is invoked when navigation service begins running in the background and again when the service gets destroyed.
This adds a new off route listener which is invoked when the devices location veers off the route and the specified criteria's in MapLibreNavigationOptions have been met.
This adds a new progress change listener which is invoked when a location change occurs and the navigation engine successfully runs it's calculations on it.
This removes a specific faster route listener by passing in the instance of it or you can pass in null to remove all the listeners. When .onDestroy is called, all listeners get removed automatically, removing the requirement for developers to manually handle this.
Remove a specific milestone by passing in the identifier associated with the milestone you'd like to remove. If the identifier passed in does not match one of the milestones in the list, a warning will return in the log.
Remove a specific milestone by passing in the instance of it. Removal of all the milestones can be achieved by passing in null rather than a specific milestone.
This removes a specific milestone event listener by passing in the instance of it or you can pass in null to remove all the listeners. When .onDestroy is called, all listeners get removed automatically, removing the requirement for developers to manually handle this.
This removes a specific navigation event listener by passing in the instance of it or you can pass in null to remove all the listeners. When .onDestroy is called, all listeners get removed automatically, removing the requirement for developers to manually handle this.
This removes a specific off route listener by passing in the instance of it or you can pass in null to remove all the listeners. When .onDestroy is called, all listeners get removed automatically, removing the requirement for developers to manually handle this.
This removes a specific progress change listener by passing in the instance of it or you can pass in null to remove all the listeners. When .onDestroy is called, all listeners get removed automatically, removing the requirement for developers to manually handle this.
Calling This begins a new navigation session using the provided directions route. this API is also intended to be used when a reroute occurs passing in the updated directions route.
Call this when the navigation session needs to end before the user reaches their final destination. There isn't a need to manually end the navigation session using this API when the user arrives unless you set MapLibreNavigationOptions.manuallyEndNavigationUponCompletion to true.