MapLibreNavigation

constructor(options: MapLibreNavigationOptions = MapLibreNavigationOptions(), locationEngine: LocationEngine, cameraEngine: Camera = SimpleCamera(), snapEngine: Snap = SnapToRoute(), offRouteEngine: OffRoute = OffRouteDetector(), fasterRouteEngine: FasterRoute = FasterRouteDetector(options), routeUtils: RouteUtils = RouteUtils())

Parameters

applicationContext

required in order to create and bind the navigation service. An application context is required here.

options

a custom built MapLibreNavigationOptions class

locationEngine

a LocationEngine to provide Location updates

cameraEngine

Navigation uses a camera engine to determine the camera position while routing. By default, it uses a SimpleCamera. If you would like to customize how the camera is positioned, create a new Camera and set it here.

snapEngine

This parameter is used to pass in a custom implementation of the snapping logic. A default snap-to-route engine is attached when this class is first initialized; setting a custom one will replace it with your own implementation.

offRouteEngine

This param is used to pass in a custom implementation of the off-route logic, A default off-route detection engine is attached when this class is first initialized; setting a custom one will replace it with your own implementation.

fasterRouteEngine

This API is used to pass in a custom implementation of the faster-route detection logic, A default faster-route detection engine is attached when this class is first initialized; setting a custom one will replace it with your own implementation.

routeUtils

core utility class for route related calculations