Mark allow-overlap symbols visible even outside of collision grid. #7244
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #7172, port of mapbox/mapbox-gl-native#12698.
The problem was that if
allow-overlap: true
symbols were placed while they were completely outside the collision grid (more than 100px past the edge of the viewport), their default opacity would get overwritten with a "not placed", and then they'd fade in once they came on-screen and got placed.The solution is to force them to be visible even if they're not included in the collision grid. It seems like we should be able to just force them to be marked as "placed", but we don't want them to take up space in the collision grid.
This is unfortunately an extra cost in the inner placement loop, but it shouldn't be too much. FWIW, nothing show up in the Paint benchmark, but that would only catch a very large regression:
document any changes to public APIstagged@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changes/cc @ansis