-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Ignore "holes" in query*Features collision detection #2293
Comments
@ansis Can you clarify this — why would we ignore holes in polygons? |
We don't need to index holes because the ring containing the hole is indexed. After looking up features in the index we use the actual geometry (including holes) to make sure the intersection is real. But we should remove this comment. We can't (with v1 tiles) know whether something is a hole right now, and even then I don't think it would be significant. |
We can because we rely on v2 tiles since switching to Earcut. E.g. here https://github.com/mapbox/mapbox-gl-js/blob/master/src/util/classify_rings.js |
Right, of course! I'd guess that skipping the hole is still not really worth it |
Polygon holes don't need to be indexed:
mapbox-gl-js/js/data/feature_tree.js
Line 68 in 1582276
The text was updated successfully, but these errors were encountered: