-
-
Notifications
You must be signed in to change notification settings - Fork 782
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
icon-size
incompatible with icon-text-fit
#989
Comments
It's also strange that |
Maybe this is by design. It looks like it does the text-based scaling first, then applies |
@ZeLonewolf, text-in-image-expert, what is your approach with the highway shields? |
😬 the thanks I get for copy/pasting @1ec5's brilliant hack. In the case of openstreetmap-americana, we are inserting images into formatted expressions, so the images in that case are treated for the most part as text characters, with some exceptions. Thus, in order to make space between adjacent images, we are using the |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
maplibre-gl-js version: All
browser: All
Steps to Trigger Behavior
content
,stretchX
andstretchY
options'icon-text-fit': 'both'
and'icon-size': 2
Compare the constant padding around the
content
area at native image size (left) vs the variable padding with'icon-size': 2
(right)Link to Demonstration
https://jsbin.com/ficawow/edit?html,js,output
Expected Behavior
Padding around text within the content area should not change based on text length, just because the image is scaled. It should remain constant, as it is with 1:1 scaling.
The text was updated successfully, but these errors were encountered: