mapbox / mapbox/mapbox-navigation-android
Use legacy shields for state routes in the United States
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
As of #5145 #5310, the maneuver banner and road name label are using a new set of Mapbox-designed shields. This new set of shield assets regresses the behavior for state routes in the United States. Each state has a very distinct design for its state route shields, but the state-specific shields were omitted due to size and resource limitations. Users still need to see accurate shields to avoid making the wrong decision at highly trafficked interchanges throughout the country.
Until Mapbox-designed state route shields are available, we should use the legacy shields from Wikimedia Commons for state routes. Whenever mapbox_shield.name is us-statecircle-white, use imageBaseURL instead of mapbox_shield.base_url, and append the .png or .svg file extension as desired. (If I’m not mistaken, navigation-native exposes imageBaseURL as well.) Regardless of file format, the legacy endpoint always bakes the number right into the image, so no compositing is required, but the image can’t be reused for other routes within the same network. The SVG files are not as optimized as the new SVG files and may not conform to the subset of SVG that can be converted to vector drawables. I think it would be acceptable to use the PNG files for this fallback to avoid any uncertainty about SVG conversion.
/cc @abhishek1508 @jill-cardamon @ShanMa1991 @ClareTrainor
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
Trace how the maneuver banner and road name label build shield URLs, focusing on the mapbox_shield.name value circle-white and the imageBaseURL fallback. Verify that United States state routes use the legacy PNG endpoint without compositing while other routes retain the current behavior; no file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100