Open rreusser opened 3 years ago
Related bugs noticed during this are that I'm not able to trigger an exaggeration transition even though it's marked transitionable and map.setTerrain()
doesn't seem to trigger a repaint when the exaggeration changes.
Issue is noticeable also while dragging over terrain, given that zoom used in expression is recalculated continuously. Video is taken against current main branch and somewhat exaggerated expression (compared to original report https://github.com/mapbox/mapbox-gl-js/issues/11044#issue-1002848550):
"exaggeration": [
"interpolate",
["linear"],
["zoom"],
0, 20,
14, 1.5,
18, 0
]
https://user-images.githubusercontent.com/549216/157892426-49e5879e-4439-449b-8853-eeeb1d3bfdad.mov
mapbox-gl-js version: latest/
2.5.0-beta.1
browser: Chrome 93
Steps to Trigger Behavior
map.setTerrain({"exaggeration": ["interpolate", ["linear"], ["zoom"], 12, 1, 15, 0 ]});
Link to Demonstration
https://jsfiddle.net/hywpmjce/1/
(shows some flickering, but due to 30fps capture of 60fps frame by frame flickering, most of the flickering is removed)
Expected Behavior
Valid zoom expressions for exaggeration aren't rendered unusable by flickering.
Actual Behavior
The map enters a feedback loop:
I believe one way to exit this feedback loop would be to avoid or defer the camera recentering when the exaggeration is modified. At the very least, it would be nice if the style spec would not accept an expression that it cannot successfully render.