-
Notifications
You must be signed in to change notification settings - Fork 1.3k
text-max-size is applied to text-size, not just collision box #1333
Comments
Workaround (and the way that Streets currently does it) is to always set |
I think this is the guilty line:
-js uses text-max-size only if text-size is missing, which I'm not sure actually happens ever: https://github.com/mapbox/mapbox-gl-js/blob/91285d64440a055cf4bc5d9e6b2d84baeb26c757/js/render/draw_symbol.js#L56 |
@ansis So this is totally borked. I wonder, does the text of the spec represent an actual/desirable use-case, or should there also/only be a literal |
Since Collision placement code should use There is also an issue about getting rid of |
Fixed in 17010bf -js cleaned up in mapbox/mapbox-gl-js@98af024 |
Per @peterqliu in chat, -native mistakenly applies the
text-max-size
styling property to the entire text and not just the collision box. Effectively,text-size
can never be larger thantext-max-size
, even if it should be.You can see this in Emerald's city labels. Set
text-max-size: 35
and city labels scale as expected.GL-JS appears to implement this properly (example, code), to spec.
Here is
SymbolBucket::addFeature
on -native.The style spec says:
It seems like this property should be renamed to something like
text-max-collision-size
if it's not meant to constraintext-size
.The text was updated successfully, but these errors were encountered: