Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use legacy shields for state routes in the United States #5383

Open
1ec5 opened this issue Jan 19, 2022 · 4 comments
Open

Use legacy shields for state routes in the United States #5383

1ec5 opened this issue Jan 19, 2022 · 4 comments
Labels
bug Defect to be fixed. jira-sync-complete platform parity Required to keep on par with iOS. UI Work related to visual components, Android Auto, Camera, 3D, voice, etc.

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jan 19, 2022

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

@1ec5 1ec5 added bug Defect to be fixed. platform parity Required to keep on par with iOS. UI Work related to visual components, Android Auto, Camera, 3D, voice, etc. labels Jan 19, 2022
@abhishek1508
Copy link
Contributor

In this case how do we address the request from customers that the shields in maneuvers should match the shields on the Map, since as far as I know Map continues to use generic mapbox designed shields.

  • Does this behavior in this case needs to be configurable?
  • Is this behavior only applicable to US since wikimedia shields probably are not available for other countries?

cc @1ec5

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 19, 2022

In this case how do we address the request from customers that the shields in maneuvers should match the shields on the Map, since as far as I know Map continues to use generic mapbox designed shields.

The requirement was for consistency in general, but this is a special case where consistency with the map would come at the expense of usability and amount to a regression compared to earlier versions.

Is this behavior only applicable to US since wikimedia shields probably are not available for other countries?

This is only applicable to the us-state shield type, which only occurs in the United States. Shield coverage is an open-ended endeavor, but all we’re currently regressing is state routes in the U.S., because the previous system only covered the U.S.

@1ec5
Copy link
Contributor Author

1ec5 commented Mar 23, 2022

This was implemented on iOS in mapbox/mapbox-navigation-ios#3723.

@1ec5
Copy link
Contributor Author

1ec5 commented May 6, 2022

Whenever mapbox_shield.name is us-state, use imageBaseURL instead of mapbox_shield.base_url, and append the .png or .svg file extension as desired.

My mistake, the correct name to look for is circle-white; us-state was the corresponding value in Mapbox Streets v7. Despite the more generic name, we don’t have to worry about mistakenly showing a U.S. state route shield where a white circle is actually warranted, because the legacy shields only cover U.S. state routes and a few other basic U.S. route networks that should never be marked by white circles. Anything else in the U.S. or any other country would correctly fall back again to the Mapbox-designed white circle shield.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed. jira-sync-complete platform parity Required to keep on par with iOS. UI Work related to visual components, Android Auto, Camera, 3D, voice, etc.
Projects
None yet
Development

No branches or pull requests

3 participants