mapbox / mapbox/mapbox-navigation-android
TurnLaneView does not handle some BannerComponents correctly
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
**Android API:*any*
**Mapbox Navigation SDK version:*1.3.0*
[TurnLaneView](https://github.com/mapbox/mapbox-navigation-android/blob/release-v1.4/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/instruction/turnlane/TurnLaneView.java#L60) seem to skip some BannerComponents values, that leads to invalid lane indicator displayed.
Some examples that we've seen that are not handled :
`slight right, right`, `left, right`
At the same time logic that parses lane indications [TurnLaneViewData.buildDrawData](https://github.com/mapbox/mapbox-navigation-android/blob/db085391c0a5e94d95e783e419c86b2cbf49d8f3/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/instruction/turnlane/TurnLaneView.java#L71) does not support mentioned indication combinations.
PS
We've noticed this by cloning TurnLane* classes to the project to modify them slightly and switching to Kotlin instead of java. Then nullable `TurnLaneViewData.drawMethod` was lost and we've got crashes for the mentioned BannerInstructions.
cc @LukasPaczos @JunDai @abhishek1508 @RingerJK since you've contributed to this classes
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 with libnavigation-ui/src/main/java/com/mapbox/navigation/ui/instruction/turnlane/TurnLaneView.java, especially TurnLaneView and TurnLaneViewData.buildDrawData. Trace how BannerComponents such as “slight right, right” and “left, right” are parsed and rendered. Done means these combinations produce valid lane indicators without crashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100