openstreetmap-americana
openstreetmap-americana copied to clipboard
Bannered shields cause neighboring shields to move too far down
With shields along concurrent routes where one shield has more banners than another, the shield with fewer banners displays farther down on the screen than expected:

@ZeLonewolf:
The issue is that shields are drawn with a common baseline for the entire string, and drawn vertically aligned to the bottom of the baseline, like so:

Yeah this is a pretty fundamental issue with the way we are handling banners. The banners are part of the shield graphic and MapLibre aligns the shield graphics in a concurrency to the baseline because they are being used as glyphs in a text string. I'm guessing a fix for this issue would require changes to MapLibre.
Each string or image expression in a format expression can be followed optionally by an style override options object. This would call for an option similar to the vertical-align CSS property.