-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make display of snapped location configurable #209
Comments
Here's some background on how things work today and what needs to happen to make snapping configurable. AndroidThe location is read from the ferrostar/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/NavigationMapView.kt Line 52 in 22f408f
The ferrostar/android/core/src/main/java/com/stadiamaps/ferrostar/core/NavigationViewModel.kt Line 71 in 22f408f
iOSOn iOS, things are slightly less thought out (actually a bit surprising! Normally it's reversed!). We don't store any location in the Ideas for implementationI think that it would be a mistake to put this in On Android, this is already in the right place (the Then, we can extend the composable UI (SwiftUI / Jetpack Compose) components with a boolean property controlling whether to use the snapped location or not, when available (there are a few layers of views; the top level is the dynamically orienting variety, which is what most users will interact with). |
@ianthetechie thanks for the clarification. As I was looking into the android code, I had some additional questions. in ferrostar/android/maplibreui/src/main/java/com/stadiamaps/ferrostar/maplibreui/NavigationMapView.kt Line 52 in 622a787
we have got two providers but Android and Simulation, which are giving us the location. But i could not find the code were they are getting snapped. I wanted to understand how android is deciding to give the snapped location ? |
So, following the chain... The ferrostar/android/core/src/main/java/com/stadiamaps/ferrostar/core/FerrostarCore.kt Line 261 in 622a787
In this case, we use the ferrostar/android/core/src/main/java/com/stadiamaps/ferrostar/core/NavigationViewModel.kt Line 60 in 622a787
Internally, you can think of the It is in the Rust code that the snapping logic actually occurs. Kotlin code is just exposing the snapped location from
So it's not really "deciding" to give the snapped location; it is always giving the snapped location from I'm suggesting that we add a new field to ferrostar/android/core/src/main/java/com/stadiamaps/ferrostar/core/NavigationViewModel.kt Line 71 in 22f408f
Hopefully I've understood the question + explained it :) If anything is unclear, just ask! |
Added Android Support for Make display of snapped location configurab…
Currently mobile platforms show the user's snapped location only. We should allow showing the raw location as this will be a practical requirement for non automotive navigation.
The text was updated successfully, but these errors were encountered: