Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple symbols in the same tile can share the same crossTileID #5993

Closed
ChrisLoer opened this issue Jan 12, 2018 · 1 comment
Closed

Multiple symbols in the same tile can share the same crossTileID #5993

ChrisLoer opened this issue Jan 12, 2018 · 1 comment
Labels
Milestone

Comments

@ChrisLoer
Copy link
Contributor

This is the GL JS version of mapbox/mapbox-gl-native#10844 (comment). You can reproduce by modifying the "chinese.html" map to give every one of the points the same text label. Then by starting at z0 and zooming in, you can get to the state where all of the points are marked as duplicate against the first point.

The fix we plan is:

  • Maintain a set of crossTileIDs used by each zoom level
  • On detecting duplicates, check to see if the about-to-be-copied crossTileID is already in use for your zoom layer. If so, move on to the next potential duplicate. If no more potential duplicates are found, assign a new crossTileID
  • On removing a bucket from the index, remove the set of crossTileIDs used by that bucket.

Example scenario imagining a z0 tile with symbols A and B, and a z1 tile with symbols A', B', and C' (all at the same location and with the same "key"):

  • A' matches with A
  • A' sees that the id from A is not used and copies it
  • B' matches with A
  • B' sees that the id from A is used and continues the search
  • B' matches with B
  • B' sees that the id from B is not used and copies it
  • C' matches with A
  • C' sees that the id from A is used and continues the search
  • C' matches with B
  • C' sees that the id from B is used and continues the search
  • C' reaches the end of the search without copying and gets assigned a new id
    both A and B are duplicate and don't get rendered
    both A' and B' are instantly visible (since they used the opacities from A and B)
    C' fades in

/cc @ansis @friedbunny

ChrisLoer added a commit that referenced this issue Jan 12, 2018
Fixes issue #5993, which would allow multiple symbols in a tile to share the same crossTileID as one of their duplicate parent-tile symbols. Once the symbols shared a crossTileID, they would permanently remain "duplicates" of each other, even after increasing zoom level allowed the CrossTileSymbolIndex to distinguish between them.
ChrisLoer added a commit that referenced this issue Jan 16, 2018
Fixes issue #5993, which would allow multiple symbols in a tile to share the same crossTileID as one of their duplicate parent-tile symbols. Once the symbols shared a crossTileID, they would permanently remain "duplicates" of each other, even after increasing zoom level allowed the CrossTileSymbolIndex to distinguish between them.
ChrisLoer added a commit that referenced this issue Jan 16, 2018
Fixes issue #5993, which would allow multiple symbols in a tile to share the same crossTileID as one of their duplicate parent-tile symbols. Once the symbols shared a crossTileID, they would permanently remain "duplicates" of each other, even after increasing zoom level allowed the CrossTileSymbolIndex to distinguish between them.
@ChrisLoer ChrisLoer added this to the 0.44.0 milestone Jan 16, 2018
@ChrisLoer
Copy link
Contributor Author

Fixed with #5994.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant