mapbox / mapbox/mapbox-navigation-android

ManeuverView update does not display anything

Open
#1,783 13 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

When I use setManeuverTypeAndModifier on my ManeuverView it does not display anything.

**Android API:**
minSdkVersion 16
targetSdkVersion 28
**Mapbox Navigation SDK version:**
implementation com.mapbox.mapboxsdk:mapbox-android-sdk:7.1.2
implementation com.mapbox.mapboxsdk:mapbox-sdk-services:4.3.0
implementation com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v7:0.5.0
implementation com.mapbox.mapboxsdk:mapbox-android-navigation:0.30.0
implementation com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.30.0

### Steps to trigger behavior

1.My view is defined in my layout :
`
`

2. I update this view each time I get a BannerInstructionMilestone
`override fun onMilestoneEvent(routeProgress: RouteProgress?, instruction: String?, milestone: Milestone?) {
if (milestone is BannerInstructionMilestone) {
updateBanner(milestone.bannerInstructions.primary())
} else if (milestone is VoiceInstructionMilestone) {
//TODO
}
}

private fun updateBanner(bannerText: BannerText?) {
if (bannerText == null) {
return
}
maneuverView.setManeuverTypeAndModifier(bannerText.type()!!, bannerText.modifier())
val roundaboutAngle = bannerText.degrees()
if (roundaboutAngle != null) {
maneuverView.setRoundaboutAngle(roundaboutAngle.toFloat())
}

text_banner_primary.text = bannerText.text()
}`
3. The bannerText.type()!! is "turn" and bannerText.modifier() is "right"
But it does not display anything even if updateManeuverView is called in ManeuverView

### Expected behavior
Should draw a turn right arrow
### Actual behavior
Display nothing

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ManeuverView and its setManeuverTypeAndModifier and updateManeuverView paths, using the reported Android Navigation SDK versions and the turn/right inputs as the reproduction case. Trace why the view produces no drawable output; done means a ManeuverView displays a right-turn arrow after receiving those values.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.