mapbox / mapbox/mapbox-navigation-android

Rendering the route line requires layer specification

Open
#4,474 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Opening this issue as there are a few places where it does not work by default, and it seems there are many approaches to get the same answer. Each of which needs to specify relative layers.

``` kotlin
private val maneuverArrowBinder: ManeuverArrowBinder by lazy {
val routeArrowOptions = RouteArrowOptions.Builder(this.requireContext())
.withAboveLayerId("road-exit-shield")
.build()
val routeArrowView = MapboxRouteArrowView(routeArrowOptions)
val routeArrowApi = MapboxRouteArrowApi()
ManeuverArrowBinder(
this,
routeArrowApi,
routeArrowView,
routesViewModel
)
}
```

``` kotlin
private val options: MapboxRouteLineOptions by lazy {
MapboxRouteLineOptions.Builder(activity)
.withRouteLineResources(routeLineResources)
.withRouteLineBelowLayerId("road-label")
.build()
}
```

``` kotlin
private val routeArrowOptions by lazy {
RouteArrowOptions.Builder(mainCarContext.carContext)
.withAboveLayerId(PRIMARY_ROUTE_TRAFFIC_LAYER_ID)
.build()
}
```

cc: @cafesilencio

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 the RouteArrowOptions and MapboxRouteLineOptions entry points shown in the issue, including withAboveLayerId and withRouteLineBelowLayerId. Compare the route arrow and route line rendering paths to determine which relative-layer defaults are missing; done means the affected rendering cases work without requiring callers to specify those layers.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.