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

'queryRenderedSymbols' results invalid between tile reload and next rendered frame #5887

Closed
ChrisLoer opened this issue Dec 18, 2017 · 3 comments
Assignees
Labels

Comments

@ChrisLoer
Copy link
Contributor

Consider a currently loaded tile A, with symbol X displaying on screen and in the collision index, then trigger a reload of tile A.

  1. When the reloaded tile result arrives on the foreground, Tile#loadVectorData will get called, which will reset the tile's featureIndex to a new index from the result. The new index won't have a collisionIndex set yet.
  2. SourceCache#_tileLoaded immediately schedules a "full placement"
  3. On the next Map#render, full placement will run, and update the collisionIndex of all tiles

If someone queries the map between steps 2 and 3, symbol X will be present in tile A's featureIndex, but it won't show up in the query results because the featureIndex isn't linked to a collisionIndex.

The invalid state should only last milliseconds, but if something is querying the map frequently (for instance, the mouseover handler), and it happens to hit this gap, you'll see some form of flickering.

/cc @ansis @andrewharvey @livemixlove

@tobrun
Copy link
Member

tobrun commented Dec 22, 2017

Linking mapbox/mapbox-gl-native#8799 as the gl-native equivalent.

@ChrisLoer
Copy link
Contributor Author

The invalid state should only last milliseconds, but if something is querying the map frequently (for instance, the mouseover handler), and it happens to hit this gap, you'll see some form of flickering.

This is what happened in closely-related issue #5506. We should get this fixed in the next release.

ChrisLoer added a commit that referenced this issue Apr 5, 2018
Addresses hover flicker from issues #5887 and #5506.
Moves all data necessary for symbol querying into FeatureIndex.
Retains old FeatureIndexes if they're associated with a bucket that was used in the current placement.
ChrisLoer added a commit that referenced this issue Apr 5, 2018
Addresses hover flicker from issues #5887 and #5506.
Moves all data necessary for symbol querying into FeatureIndex.
Retains old FeatureIndexes if they're associated with a bucket that was used in the current placement.
ChrisLoer added a commit that referenced this issue Apr 5, 2018
Addresses hover flicker from issues #5887 and #5506.
Moves all data necessary for symbol querying into FeatureIndex.
Retains old FeatureIndexes if they're associated with a bucket that was used in the current placement.
ChrisLoer added a commit that referenced this issue Apr 6, 2018
Addresses hover flicker from issues #5887 and #5506.
Moves all data necessary for symbol querying into FeatureIndex.
Retains old FeatureIndexes if they're associated with a bucket that was used in the current placement.
ChrisLoer added a commit that referenced this issue Apr 6, 2018
Addresses hover flicker from issues #5887 and #5506.
Moves all data necessary for symbol querying into FeatureIndex.
Retains old FeatureIndexes if they're associated with a bucket that was used in the current placement.
@ChrisLoer ChrisLoer mentioned this issue Apr 11, 2018
5 tasks
ChrisLoer added a commit that referenced this issue Apr 12, 2018
Addresses hover flicker from issues #5887 and #5506.
Also fixes issue #5475/#6298, so that symbols that bleed over tile boundaries don't get missed. Under the hood, there are some good simplifications:
 - No round-tripping of viewport query coordinates through tile space
 - No more need to merge duplicate results from the same symbol showing up in multiple tiles
 - All querying-related data can now be indexed with a bucket instance id and a feature index
 - `Placement` now manages lifetime of any data needed to query against its CollisionIndex
 - CollisionBoxArray no longer involved in querying at all
ChrisLoer added a commit that referenced this issue Apr 12, 2018
Addresses hover flicker from issues #5887 and #5506.
Also fixes issue #5475/#6298, so that symbols that bleed over tile boundaries don't get missed. Under the hood, there are some good simplifications:
 - No round-tripping of viewport query coordinates through tile space
 - No more need to merge duplicate results from the same symbol showing up in multiple tiles
 - All querying-related data can now be indexed with a bucket instance id and a feature index
 - `Placement` now manages lifetime of any data needed to query against its CollisionIndex
 - CollisionBoxArray no longer involved in querying at all
ChrisLoer added a commit that referenced this issue Apr 13, 2018
Addresses hover flicker from issues #5887 and #5506.
Also fixes issue #5475/#6298, so that symbols that bleed over tile boundaries don't get missed. Under the hood, there are some good simplifications:
 - No round-tripping of viewport query coordinates through tile space
 - No more need to merge duplicate results from the same symbol showing up in multiple tiles
 - All querying-related data can now be indexed with a bucket instance id and a feature index
 - `Placement` now manages lifetime of any data needed to query against its CollisionIndex
 - CollisionBoxArray no longer involved in querying at all
ChrisLoer added a commit that referenced this issue Apr 13, 2018
Addresses hover flicker from issues #5887 and #5506.
Also fixes issue #5475/#6298, so that symbols that bleed over tile boundaries don't get missed. Under the hood, there are some good simplifications:
 - No round-tripping of viewport query coordinates through tile space
 - No more need to merge duplicate results from the same symbol showing up in multiple tiles
 - All querying-related data can now be indexed with a bucket instance id and a feature index
 - `Placement` now manages lifetime of any data needed to query against its CollisionIndex
 - CollisionBoxArray no longer involved in querying at all
@ChrisLoer
Copy link
Contributor Author

Fixed in #6497.

ChrisLoer added a commit that referenced this issue May 18, 2018
Addresses hover flicker from issues #5887 and #5506.
Also fixes issue #5475/#6298, so that symbols that bleed over tile boundaries don't get missed. Under the hood, there are some good simplifications:
 - No round-tripping of viewport query coordinates through tile space
 - No more need to merge duplicate results from the same symbol showing up in multiple tiles
 - All querying-related data can now be indexed with a bucket instance id and a feature index
 - `Placement` now manages lifetime of any data needed to query against its CollisionIndex
 - CollisionBoxArray no longer involved in querying at all
ChrisLoer added a commit that referenced this issue May 18, 2018
Addresses hover flicker from issues #5887 and #5506.
Also fixes issue #5475/#6298, so that symbols that bleed over tile boundaries don't get missed. Under the hood, there are some good simplifications:
 - No round-tripping of viewport query coordinates through tile space
 - No more need to merge duplicate results from the same symbol showing up in multiple tiles
 - All querying-related data can now be indexed with a bucket instance id and a feature index
 - `Placement` now manages lifetime of any data needed to query against its CollisionIndex
 - CollisionBoxArray no longer involved in querying at all
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

2 participants