MapNavigationManager

Manages navigation along itineraries on the map.

Starting a navigation takes the camera, and stopping one does not give it back. Every startNavigation applies its cameraMode and leaves it applied: nothing is saved and nothing is restored. A host that wants the camera back reads mapView.locationManager.cameraMode before it starts, and writes it back when NavigationEvent.Stopped arrives — which it does for both an explicit stopNavigation and the arrival auto-stop of NavigationOptions.stopWhenArrivedAtDestination.

Deliberate, not missing. Starting a navigation is a one-shot instruction to set a mode, not a lease on it, and the SDK cannot tell a mode the host wants back from one it has since replaced. Restoring is also rarely as simple as it looks indoors: a level change resets the camera mode to CameraMode.NONE, so on a route where the user changes floor the mode recorded before the start is no longer the one the screen wants by the end.

Properties

Link copied to clipboard
Link copied to clipboard
abstract val errors: Flow<Throwable>
Link copied to clipboard
Link copied to clipboard
abstract val navigationEvents: Flow<NavigationEvent>
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
abstract suspend fun startNavigation(navigation: Navigation, itineraryOptions: ItineraryOptions? = null, cameraMode: Int? = CameraMode.TRACKING_COMPASS): Navigation

Starts navigation using a previously obtained Navigation object.

abstract suspend fun startNavigation(itinerary: Itinerary, options: NavigationOptions = NavigationOptions(), searchRules: ItinerarySearchRules = ItinerarySearchRules(), itineraryOptions: ItineraryOptions? = null, cameraMode: Int? = CameraMode.TRACKING_COMPASS): Navigation

Starts navigation along a specific itinerary without performing a new itinerary search.

abstract suspend fun startNavigation(origin: Coordinate? = null, destination: Coordinate, travelMode: TravelMode = TravelMode.Walk(), options: NavigationOptions = NavigationOptions(), searchRules: ItinerarySearchRules = ItinerarySearchRules(), itineraryOptions: ItineraryOptions? = null, timeout: Duration = 30.seconds, cameraMode: Int? = CameraMode.TRACKING_COMPASS): Navigation

Starts navigation from an optional origin to the given destination by fetching the best itinerary.

Link copied to clipboard