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 }}
Repository navigation
_retainChildren passes wrong coordinates in recursive call #2175
In _retainChildren, the recursive call passes i, j instead of 2 * x + i, 2 * y + j.
This means when looking for z+2 fallback tiles, it searches completely wrong coordinates. For example, a tile at (100, 200, z=10) should look for children at (400-403, 800-803) at z=12, but instead it searches around (0-3, 0-3).
_retainAncestor does this correctly, so it looks like a copy-paste mistake.
Hey @shindonghwi, thanks for filing. Is there actually an issue that your fix resolves? We'll merge the PR either way (assuming its all OK), but this would be good to know.
When zooming out fast, if z+1 tiles aren't loaded, it falls back to z+2 - but it was looking at wrong coords so you'd get blank areas instead of cached tiles.
changed the title [-]_retainChildren passes wrong coordinates in recursive call[/-][+]`_retainChildren` passes wrong coordinates in recursive call[/+]on Dec 21, 2025
Activity
JaffaKetchup commentedon Dec 21, 2025
Hey @shindonghwi, thanks for filing. Is there actually an issue that your fix resolves? We'll merge the PR either way (assuming its all OK), but this would be good to know.
shindonghwi commentedon Dec 21, 2025
Spotted it while reading the code!
When zooming out fast, if z+1 tiles aren't loaded, it falls back to z+2 - but it was looking at wrong coords so you'd get blank areas instead of cached tiles.
[-]_retainChildren passes wrong coordinates in recursive call[/-][+]`_retainChildren` passes wrong coordinates in recursive call[/+]