-
Notifications
You must be signed in to change notification settings - Fork 318
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
Imageless banner components should include generic shield icon #1190
Comments
@1ec5 can you attache the response from the screenshot above? I think there is some confusion on whether there should be shields loaded here or not. |
Here’s what the relevant part of the response looks like (for a different off-ramp instruction in Montréal, but the point stands): "primary": {
"type": "off ramp",
"modifier": "right",
"components": [
{
"text": "Exit",
"type": "exit"
},
{
"text": "25",
"type": "exit-number"
},
{
"text": "335",
"type": "text"
},
{
"text": "Sud",
"type": "text"
}
],
"text": "Exit 25 335 Sud"
} It isn’t surprising that there’s no shield for “335” at the moment, because it’s just a |
@1ec5 is this something we should move to the server? |
No, I think what should happen is that the Directions API reliably assigns these components the The API’s current approach is to vend a separate image for each route in the world. That approach doesn’t scale. There’s a very large and ever growing set of route numbers for which we lack shield artwork. It would be infeasible to maintain a separate image for each one, whereas it would be straightforward to compose a generic shield on the fly. This is no different than generating exit number components on the fly. In fact, it’s pretty likely that we’d be able to reuse some of the work in #1272 to draw the generic shield. |
@1ec5 I agree, but I would like to point out that it would be much easier to implement this if we could get something in the API (such as a component type) to tell us "this is a motorway route", even though we don't have a shield for it -- Otherwise how do we distinguish between |
Yes, that’s what I mean by:
The issue currently is that the route number is combined into the overall |
Ah, my apologies. I didn't see that. |
This is done, #1417 |
If a VisualInstructionComponent lacks an image, it should be drawn as a generic shield so that it doesn’t blend in with the surrounding text. Two or more of these bare numbers can look pretty confusing next to each other. The generic shield could be a white rounded rectangle, as in the Navigation Guidance styles:
We only support shields inside the U.S. at the moment (#334), so this would be a boon for countries like Canada and Sweden that don’t prefix route numbers with alphabetic prefixes.
/cc @bsudekum @mapbox/guidance
The text was updated successfully, but these errors were encountered: