mapbox / mapbox/mapbox-navigation-android
android 显示的剩余距离 永远都是50的倍数,比如前方120米左转,就会显示100左边, 比如前方280左转,就会显示250米左转,
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
@alexander-kulikovskii
@springmeyer
@zugaldia @
显示的剩余距离 永远都是50的倍数,比如前方120米左转,就会显示100左边, 比如前方280左转,就会显示250米左转,
这样的话,我通过回调 拿到的 BannerInstructions 的剩下距离就跟 导航页面显示的不一样了。
The remaining distance displayed by android is always a multiple of 50, for example, turning left 120 meters ahead will show 100 left, for example, turning left 280 meters ahead will show 250 meters left. In this case, the remaining distance of the BannerInstructions I got through the callbacks is different from what the navigation page shows.
implementation "com.mapbox.navigation:ui-dropin:2.9.2"
implementation "com.mapbox.navigation:android:2.9.2"
例子:
"bannerInstructions":{"primary":{"type":"turn","text":"莲塘路","modifier":"right"},"sub":{},"distanceAlongGeometry":87.7229995727539,"secondary":{}}
请问 我该如何让这两个值一致???
How can I make these two values consistent??
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the Android navigation UI's displayed remaining distance with BannerInstructions.distanceAlongGeometry using the reported 2.9.2 setup. Trace where the distance is formatted or rounded and verify the behavior with the 120 m and 280 m examples. Done means the displayed distance and callback value are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100