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

fix order of 3D features in query results (fix #7883) #7953

Merged
merged 1 commit into from
Feb 27, 2019

Conversation

ansis
Copy link
Contributor

@ansis ansis commented Feb 26, 2019

This fixes #7883, a bug where a query returned 3D features after 2D features even if they were rendered above them. Query results should be returned in the order the features are rendered.

The fix is somewhat tricky because the order of features can get complicated:

  • The order between features in two 2D layers is always determined by layer order
  • The order between features in two 3D layers is always determined by depth.
  • The order between a 2D and 3D feature can depend on a 3rd layer if the 3rd layer contains a 3D feature that is closer than the other 3D feature.

This sorts features in the order they are rendered and adds a query test to make sure that is the case.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • manually test the debug page

@ansis ansis merged commit 70141fa into master Feb 27, 2019
@ansis ansis deleted the fix-extrusion-sort-order branch February 27, 2019 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

queryRenderedFeatures returning 3d features after 2d features, regardless of appearance
2 participants