-
Notifications
You must be signed in to change notification settings - Fork 38
Highway shields #36
Comments
I was thinking about treating highway shields as generated icons: rather than specifying an |
Specifically, we could implement something akin to http://www.w3.org/TR/css3-background/#border-images: You provide a templated image that can expand in various directions, and add then fit it to the generated text for the shield. |
Nine-part images are important for more than just highway shields, so I’ve opened a separate issue to discuss them: #581. In addition to nine-part images, having a dedicated way to define how label text is styled and superimposed on a nine-part image would make it possible to define a syntax for styling concurrent route shields without requiring a separate layer for each combination of shield types. |
@nickidlugash Are there additional style spec features needed for highway shields beyond |
@jfirebaugh hmm so the original intent behind this ticket was addressed a while back:
In terms of actual highway shield generation in the renderer, even nine-part resizeable images would not enable us to generate our more complex highway shields, but we can discuss this on other tickets. I can close here. |
Nine-part images would help with the most common shield shapes (rounded rectangles), but indeed the fancier shapes would require other solutions, such as choosing a different shield based on the reflen. #597 would make that more scalable. |
We should have a way of creating highway shields. I'm not sure if it makes more sense for this to be a separate feature from creating markers, or essentially the same. If we can implement each marker + label as a grouped element so that there isn't the issue of markers being visible while labels are not, and vice versa, then highway shields could just be markers + labels with zero offset.
@ajashton's comment on previous ticket about this:
Yes, there are very old discussions about removing the separate "shield" concept from Mapnik as well and just making the marker handling flexible enough to do the same thing.
There are two main cases I'd want to have covered (for highway shields and many other styling situations):
Text on top of a rectangle that is fitted to the width/height of the text, with border/corner-radius/padding options similar to divs in CSS.
Text on top of a image, to handle more complex things like US Interstate shields.
The text was updated successfully, but these errors were encountered: