-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Flickering labels when panning #7026
Comments
This seems like it might be related #7003 |
given #7003 (comment), I don't think this is related |
This is reproducible on the iOS 3.4.0 release branch but not the 3.3.7 tag. |
Here's another recording of consecutive frames: http://bl.ocks.org/kkaefer/raw/18a5bac434522ec92bd5113ce10fdb2c/ Based on the following analysis, I believe these are two distinct issues:
|
From code comment linked above:
I doubt that adjustments to eviction timing will make this strategy viable. Consider what happens, under the current algorithm, when slowly panning at zN across a region for which you have a parent tile at zN-1 cached, but tiles at zN are getting loaded on demand as you pan. Whenever a new tile a zN is needed, the algorithm notices that it's not immediately available, but that the zN-1 parent tile is. It loads in the parent tile. This causes labels on up to three other zN tiles to disappear, to be replaced with the labels from the parent tile, which might be completely different due to different data selection at zN-1. Then the fourth tile loads, and zN labels are rendered again. Pan a little bit further, and the process repeats. To me this suggests that a "drop all children" approach isn't viable. If there are renderable symbol layers for the children, we should be preferring those to the symbol layer of the parent. |
After thinking about this for a while, this alone isn't a viable strategy either. There are at least three cases we need to consider:
All these are based on the assumption that we are unable to relax the requirement that symbol layers cannot be clipped. If we can clip symbol layers, then other options may be feasible. The general principle is: continue rendering previously-rendered symbol data for a tile until such time as the tile can be fully covered by ideal tiles with ready-to-render symbol data. |
Tile expiration-related flickering was fixed in #7616. This issue remains to track the flickering issue when panning, which is more difficult to fix. |
We should fix this with #10103. |
This is the assumption that the The way I'm starting to think about this is that a
The idea here is that while loading "new" areas of the map (e.g. a pan operation), we'll still be able to start showing tiles before symbols load, but when we're zooming in and out on tiles where symbols are already displaying, we'll wait for tiles to fully loaded before we swap them out. The non-symbol layers should all be clipped based on the set of tiles that are chosen, and the symbol layers should be un-clipped but with duplicate detection + cross-tile collision detection handling symbols from overlapping/mixed-zoom tiles. I'm playing around with an implementation that does this, but I haven't gotten the tile clipping logic right yet. |
As part of #10436, we decided to remove the "two-phase" logic that loads non-symbol buckets before symbol-buckets. This brings gl-native into line with gl-js, and significantly simplifies the tile-loading logic, at the cost of losing the "progressive load" effect when glyphs are taking longer to download than the rest of the map. Combined with the Rendering mixed-zoom tiles (i.e. a parent tile partially covered by children) is still a tricky case because the overlapping tiles are both fed into the collision index at the same time (meaning you can get cases where symbols from both a parent and a child tile are rendered next to each other for a short time, see #10480). However, we now have fade animations for everything, so the worst case should be symbols starting to fade in/out and then reversing course. |
Seeing this at a panning operation. What's happening is this:
The text was updated successfully, but these errors were encountered: