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

Map.queryRenderedFeatures uses stale tile padding #6536

Open
asheemmamoowala opened this issue Apr 18, 2018 · 0 comments
Open

Map.queryRenderedFeatures uses stale tile padding #6536

asheemmamoowala opened this issue Apr 18, 2018 · 0 comments
Labels

Comments

@asheemmamoowala
Copy link
Contributor

asheemmamoowala commented Apr 18, 2018

Carried forward from here(comment)

The feature states API allows changing a feature's paint properties, but does not reflect these changes in the tile's queryPadding. Calls to Map#queryRenderedFeatures will not include results for features affected by feature-state expressions, and return incorreclt results.

The Tile#queryPadding value is not updated after a call to Map#setPaintProperty()
Map#setPaintProperty invalidates a style layer and triggers a refresh of the tile's query padding though an asynchonous updateLayers operation. Similar to symbol placement after a frame, the query results may be out of sync when the async operation to update the feature index (and query padding) are not complete.

One approach is to dynamically compute Tile.queryPadding to ensure that the padding reflects current tile state.

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