You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
c is being flipped between true and false as part of the polygon ray-tracing algorithm. That's fine. The issues are that:
c is not being reset between polygons. This has the potential to lead to some false-positives (theoretically? haven't reproduced that yet)
When c == true after processing a complete polygon, the entire function should return true as being within any Polygon of a MultiPolygon means you are within that MultiPolygon. There's not the same concept of "holes" that Polygons have. The MultiPolygon rendering supports this fact.
Nothing in RFC 7946 (current or previous revisions) calls it out as being invalid or having special considerations.
There's actually already a query integration test in place that uses a multipolygon with two overlapping polygons. The reason that one currently works is that it tests against a bounding box instead of just point. Therefore it hits a different code path that doesn't have the same issues.
maplibre-gl-js version: 5.2.0 (latest tested, bug goes back 9+ years)
browser: Chrome 133
Steps to Trigger Behavior
Link to Demonstration
https://jsbin.com/bufawog/edit?html,output
Check the console for output.
Expected Behavior
Using queryRenderedFeatures on an even number of overlapping Polygons in a MultiPolygon should work detect the MultiPolygon.
Actual Behavior
Using queryRenderedFeatures on an even number of overlapping Polygons in a MultiPolygon does not detect the MultiPolygon.
The text was updated successfully, but these errors were encountered: