Skip to content

Collision detection incorrect for symbol layers that share the same layout properties #6548

Closed

Description

@ChrisLoer

When we generate symbol buckets for a tile, we use the groupByLayout function to group together all style layers that share a common set of layout properties and a common source layer. Since the two layers share common layout data, they can also share a SymbolBucket, even though they may render differently due to different paint properties.

The shared SymbolBucket breaks the current assumptions of our CrossTileSymbolIndex, because for each layer, we store each symbol's crossTileID in the associated bucket's SymbolInstances. When two symbols from two different layers share the same SymbolInstance, they can overwrite each other's crossTileIDs.

One way this could manifest is:

  • Layer1 and Layer2 share the same bucket, and the layers are allowed to collide with each other.
  • Layer1 gets placed
  • Layer2 gets placed, but matches all the symbols for Layer1, so every SymbolInstance is marked collided
  • At render time, symbols in Layer1 pick up opacities from the collided Layer2, so that no symbols are shown from either layer.

I think the fix here is just to have SymbolInstance store crossTileIDs on a per-layer basis.

/cc @ansis

Activity

  1. self-assigned this
    on Apr 20, 2018
  2. added a commit that references this issue on Apr 23, 2018
    f213350
  3. added this to the 0.45.0 milestone on Apr 25, 2018
  4. ChrisLoer commented on Apr 25, 2018

    @ChrisLoer
    ContributorAuthor

    Fixed in #6558/#6556.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions