mapbox / mapbox/mapbox-navigation-android

RouteLineResources routeDefaultColor not working

Open
#7,502 1 comment 0 reactions 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

Android version: 33
Navigation SDK version: 2.14.2

Steps to trigger behaviour

Change colours in the routeLineResources:

private val routeLineResources: RouteLineResources by lazy {
    val grayColorWithAlpha = Color.argb(178, 128, 128, 128)
    RouteLineResources.Builder()
        .routeLineColorResources(
            RouteLineColorResources.Builder()
                .routeLowCongestionColor(Color.YELLOW)
                .routeCasingColor(Color.RED)
                .routeDefaultColor(Color.CYAN)
                .routeLowCongestionColor(Color.GREEN)
                .routeClosureColor(Color.BLUE)
                .routeLineTraveledColor(grayColorWithAlpha)
                .routeLineTraveledCasingColor(Color.TRANSPARENT)
                .build()
        )
        .build()
}
Expected behavior

The routeDefaultColor color should change according to the specified color values in the RouteLineResources.

Actual behavior

The line color set by routeDefaultColor remains unchanged. All other colours change. See screenshot below.

Screenshot_20230912_162147_Mapbox Navigation Examples

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 by tracing RouteLineResources and RouteLineColorResources.Builder, focusing on how routeDefaultColor is consumed. Reproduce the issue with Android 33 and Navigation SDK 2.14.2; done when the default route line uses the specified color while the other configured colors continue to work.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.