-
maplibre-gl-js version: 2.4.0 browser: Chrome, Firefox Steps to Trigger Behavior
Link to DemonstrationSee behavior between zoom levels 16 and 17. Expected BehaviorExpected the text to stay in place, like this. Actual BehaviorThe text gets duplicated or displaced, like this. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is generally by design when you add a text to a line rather than a point. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply. Ok, so the solution would be to add a separate GeoJSON with a point at the center of the box and a text layer for that point? The issue is that it behaves differently on different zoom levels, without any other symbols that would collide with or affect the text. But I can see that it can be complicated to fix it and for us it should be good enough to add points for all text labels we want. |
Beta Was this translation helpful? Give feedback.
This is generally by design when you add a text to a line rather than a point.
There are many ways to style it. and choosing
always
will cause the text to overlap as the property name suggests.I'm not sure I understand what the issue is.
If this is a usage question, please convert this to a discussion.