You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Symbols canned up when switching between high and low zoom levels #12356
I noticed this behavior recently while switching from the demo route (E) and going back to world view (X) in our GLFW demo app:
From the image above, you can see all the symbols fading from a single point on the map. @ChrisLoer
I am assuming this as a side effect of #10436 - I'd like to propose that we establish a zoom range threshold for the fade transition to happen.
But if it's a problem, it shouldn't be too hard to address, I think we'd basically put some kind of "zoom delta cap" on the tiles that we hold onto in the "holdForFade" logic, so that maybe after you crossed three zoom levels out we just immediately made symbols disappear.
If you look higher up in that logic, you'll see where we calculate the idealZoom for the transform state. I think the logic you want would be something like "hold for fade if the holdForFade() == true and the tile's zoom is within +/- 1 of the idealZoom". That way, for instance, if we're rendering at z12.4, we'll show z12 tiles but we'll also hold onto z13 or z11 tiles for fading. If we were holding onto a z13 tile while zooming out, we'd stop rendering the tile as soon as we crossed to z11.99. When you crossed from z12 to z11.99, the z13 tile would get discarded. If you crossed back to z12, it wouldn't start rendering again (you'd have to go all the way back to z13 to get it to show again).
I think we should try making the change and play around with it for a while to make sure it gives us a visual effect we like -- we might want to tweak the "how long to hold" parameters one way or another.
Activity
ChrisLoer commentedon Jul 10, 2018
This behavior was introduced with cross-tile symbol fading -- we were aware of it and decided it was OK:
#10468 (comment)
But if it's a problem, it shouldn't be too hard to address, I think we'd basically put some kind of "zoom delta cap" on the tiles that we hold onto in the "holdForFade" logic, so that maybe after you crossed three zoom levels out we just immediately made symbols disappear.
ChrisLoer commentedon Oct 12, 2018
@m-stephen if you're interested in taking a look at this, probably the easiest place to modify is right here in the
TilePyramidlogic:mapbox-gl-native/src/mbgl/renderer/tile_pyramid.cpp
Lines 199 to 205 in 9e7694c
If you look higher up in that logic, you'll see where we calculate the
idealZoomfor the transform state. I think the logic you want would be something like "hold for fade if theholdForFade() == trueand the tile's zoom is within +/- 1 of theidealZoom". That way, for instance, if we're rendering at z12.4, we'll show z12 tiles but we'll also hold onto z13 or z11 tiles for fading. If we were holding onto a z13 tile while zooming out, we'd stop rendering the tile as soon as we crossed to z11.99. When you crossed from z12 to z11.99, the z13 tile would get discarded. If you crossed back to z12, it wouldn't start rendering again (you'd have to go all the way back to z13 to get it to show again).I think we should try making the change and play around with it for a while to make sure it gives us a visual effect we like -- we might want to tweak the "how long to hold" parameters one way or another.
stale commentedon Apr 10, 2019
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
stale commentedon Oct 8, 2019
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.
kkaefer commentedon Oct 10, 2019
We've added something similar to GL JS recently: mapbox/mapbox-gl-js#8628
stale commentedon Apr 7, 2020
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.