Skip to content

_retainChildren passes wrong coordinates in recursive call #2175

Closed

Description

@shindonghwi

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.

PR: #2174

Activity

  1. JaffaKetchup commented on Dec 21, 2025

    @JaffaKetchup
    Member

    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.

  2. shindonghwi commented on Dec 21, 2025

    @shindonghwi
    ContributorAuthor

    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.

  3. changed the title [-]_retainChildren passes wrong coordinates in recursive call[/-] [+]`_retainChildren` passes wrong coordinates in recursive call[/+] on Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions