mapbox / mapbox/mapbox-navigation-android-examples
Change route line default color
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 65
- Forks
- 56
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 2
Description
I'm not able to change the route line default color as in the image below, I tried by changing routeDefaultColor without a result
` val customColorResources = RouteLineColorResources.Builder()
.routeCasingColor(Color.parseColor("#00DEDF"))
.routeDefaultColor(Color.parseColor("#00DEDF"))//TODO :: it is not work
.build()
val routeLineResources = RouteLineResources.Builder()
.routeLineColorResources(customColorResources)
.build()
val mapboxRouteLineOptions = MapboxRouteLineOptions.Builder(this)
.withVanishingRouteLineEnabled(true)
.withRouteLineResources(routeLineResources)
.withRouteLineBelowLayerId(LocationComponentConstants.LOCATION_INDICATOR_LAYER)
.build()
routeLineApi = MapboxRouteLineApi(mapboxRouteLineOptions)
routeLineView = MapboxRouteLineView(mapboxRouteLineOptions)`
Navigation SDK : com.mapbox.navigation:android:2.9.4
any help here ?

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 reproducing the route-line styling from the provided Kotlin snippet with Navigation SDK com.mapbox.navigation:android:2.9.4, focusing on the RouteLineColorResources and RouteLineResources configuration. Confirm why routeDefaultColor has no visible effect, then verify that the rendered default route line uses the requested color while retaining the configured casing color.
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