maplibre / maplibre-navigation-android

Maplibre Navigation SDK for Android
MIT License
86 stars 44 forks source link

[Question] Disabling / intercepting off route recalculation #87

Closed ianthetechie closed 10 months ago

ianthetechie commented 10 months ago

I don't see discussions enabled on this repo for asking questions, so I'm opening an issue.

Android API: 33 Maplibre Navigation SDK version: 2.0.0

I am building a basic navigation app and am currently using the NavigationLauncher (as in part of the sample app) because it's easy and doing anything else looked like an inordinate amount of work to fit into a Jetpack Compose app. This cleanly launches everything in another activity... anyways...

My question is exactly how I'd go about either disabling or intercepting the off route detection -> forced recalculation. I am not using Mapbox, so the default behavior seems to just get the app into a broken state of "recalculating" but it will never actually succeed.

I believe it's possible to attach listeners and set more options on the MapboxNavigation object itself, but I can't quite figure out how this is supposed to be set up. It seems unsupported if using the launcher. Any pointers would be appreciated as to alternate approaches that would let us set up the listeners.