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

Avoid false positives for line and polygon hit detection #9797

Merged
merged 1 commit into from Jul 23, 2019

Conversation

ahocevar
Copy link
Member

@ahocevar ahocevar commented Jul 23, 2019

This pull request adds stricter selection criteria of candidates for hit detection on vector tiles: Currently, when decluttering is on, features from any tile will be considered for a clicked coordinate. This works well for points. But for lines and polygons, the geometries will very likely be clipped and oversimplified on any tile but the one that is rendered, i.e. contains the clicked coordinate.

By adding an additional check, we can avoid false positives resulting from oversimplified geometries outside the tile boundary.

Copy link
Member

@marcjansen marcjansen left a comment

Choose a reason for hiding this comment

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

LGTM

@ahocevar ahocevar merged commit 0cc1166 into openlayers:master Jul 23, 2019
@ahocevar ahocevar deleted the vectortile-false-positives branch July 23, 2019 19:32
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.

None yet

2 participants