mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
11.16k stars 2.21k forks source link

text-size interpolation by zoom "symbol-placement": "line-center" is inconsistent #7851

Open daumann opened 5 years ago

daumann commented 5 years ago

There are two separate issues I would like to bring up.

The first one is that if a text-size is interpolated (linear) by zoom level, inactive zoom levels change the results. What I mean is this style with a map on a zoom level 2: [ "interpolate", [ "linear" ], [ "zoom" ], 2, [ "interpolate", [ "linear" ], [ "get", "d" ], 1500, 8, 3500, 30 ] ] gives a different result on zoom level 2 with another stop (which shouldn't matter because zoom level is 2): [ "interpolate", [ "linear" ], [ "zoom" ], 2, [ "interpolate", [ "linear" ], [ "get", "d" ], 1500, 8, 3500, 30 ], 9, [ "interpolate", [ "linear" ], [ "get", "d" ], 1500, 80, 3500, 300 ] ]

Why is that?

The second issue is that the text-size interpolation by zoom level (and a property variable) has changed between versions without clear mention in the docs.

https://chronas.org uses mapbox-gl 0.47.0 for country labels (which use this settings: https://raw.githubusercontent.com/Chronasorg/chronas/master/src/components/map/mapStyles/map-style-basic-v8.json ("id": "area-labels")), when bumping to mapbox-gl 0.52.0, none of the labels are displayed anymore, only when changing the number settings some labels show up with unfurtonately not the same result.

Can you explain what parameters could have changed and how I can adapt my settings accordingly?

daumann commented 5 years ago

Any updates on that? @mourner