mapbox / mapbox/mapbox-navigation-ios
[QUESTION]: Drawing a route with different colors for different legs
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 918
- Forks
- 326
- Avg merge
- 1h 16m
- Merged PRs (30d)
- 3
Description
I am trying to draw a route on a `NavigationMapView` using `.showcase`, while coloring each route leg differently based on a specific logic. Imagine Google Maps when using public transport. Each leg of the route will be colored in a color matching the transportation mode. I am trying to do something similar using mapbox. After trying for a long time I have not found a way to reliably color legs differently. I could also not find a way to reliably color different routes differently, except for the difference between alternatives and main route.
Is there a way to do that currently? If not, can this be added in a future update? It seems so simple...
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 reviewing NavigationMapView and its .showcase route-rendering behavior, focusing on how route legs, alternatives, and the main route are represented. Determine whether per-leg and per-route colors are currently supported; done means documenting the existing limitation or specifying the API behavior needed for transportation-mode coloring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100