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 using within expression filter when query features #9933

Merged
merged 4 commits into from
Sep 9, 2020

Conversation

zmiao
Copy link
Contributor

@zmiao zmiao commented Aug 16, 2020

Launch Checklist

Fix: #9923

Pass geometry and canonical tile id in when evaluating feature via within filter

  • briefly describe the changes in this PR
  • include before/after visuals or gifs if this PR includes visual changes
  • write tests for all new functionality
  • post benchmark scores
  • manually test the debug page
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>Fix using within expression filter when query features</changelog>

@zmiao zmiao self-assigned this Aug 16, 2020
@zmiao zmiao added the bug 🐞 label Aug 16, 2020
Copy link
Member

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix itself looks good, but I'm worries that the same pattern of code is repeated multiple times — not only the two nearly identical bits here, but also similar filter code in each layer bucket file. Can we introduce some kind of utility function (maybe similar to loadGeometry) to clean this up?

@zmiao zmiao force-pushed the zmiao-fix-within-queryFeature branch from 30b73d9 to 4c3fb90 Compare September 7, 2020 19:32
@zmiao zmiao force-pushed the zmiao-fix-within-queryFeature branch from 4c3fb90 to 9136a4c Compare September 7, 2020 21:04
@zmiao
Copy link
Contributor Author

zmiao commented Sep 8, 2020

@mourner sorry for the late update, now I added a new utility function for the feature construction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Within expression seems broken when used in querySourceFeatures method
2 participants