You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the many issues you tried to help me fix some items placements the one thing i was trying to achieve was to have a new kind of shield component. I think everything we tried with placement-priority and such could not solve it. I think the fact is that we would need a new shield component or an improved one.
The idea is to have a shield where the text can be hidden if there is not enough room to draw both the text and the icon.
This is what openstreetmap and google maps do
Now apple maps does it a bit differently. It actually place the text on the best side to be able to draw the text
Finally mapbox does not support this!
Now if i can push further on what i would love the shield to become:
option to hide only the text when not enough room to allow the icon to be drawn in more cases
option to have a text in place of the icon (font, text, color, size...) => font icons allowing colors based style, smaller styles, easier maintenance(compare to images)
Let me know what you think
The text was updated successfully, but these errors were encountered:
@mtehver i have been thinking and thinking about this. Maybe we dont need nor want a new component. It would mean not compatible with other carto css style and might require a lot of work.
Maybe we can accomplish this with a few changes:
shield-placements support: i would guess this one would require a lot of work. But it would also make a huge difference in rendering.
*shield-transform support: i think it is the only way to force the size of "icon" in the shield?
a new shield prop for text visibility:
auto: show when enough room
never: simply hide the text. Right now if you want a zoom level based rule to hide a shield label you have to either use marker a those level or use " " as shield text which means it takes the space. BTW is it a bug for shield not to show when we dont set text or set it to ""?
function to generate image from font icon: this is the trick which would allow to still use font icons with shield. something like font-icon(facename, char, size?)
function to colorize an image: I am not sure this one is necessary. I dont remember for sure but there is no way to colorize a shield icon right?
I know some of those would not be compatible with web cartocss. Though it would allow cartoSDK styles to be in sync with other frameworks styling
In the many issues you tried to help me fix some items placements the one thing i was trying to achieve was to have a new kind of shield component. I think everything we tried with placement-priority and such could not solve it. I think the fact is that we would need a new shield component or an improved one.
The idea is to have a shield where the text can be hidden if there is not enough room to draw both the text and the icon.

This is what openstreetmap and google maps do
Now apple maps does it a bit differently. It actually place the text on the best side to be able to draw the text

Finally mapbox does not support this!
Now if i can push further on what i would love the shield to become:
Let me know what you think
The text was updated successfully, but these errors were encountered: