mapbox / mapbox/mapbox-navigation-android-examples

Change route line default color

Open
#173 4 comments 0 reactions 0 assignees View on GitHub

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 ?
Screen Shot 2022-12-13 at 3 12 47 PM

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.