mapbox / mapbox/mapbox-navigation-android
Rendering the route line requires layer specification
Nobody has claimed this yet.
- 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
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 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