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

within expression returns incorrect results for polygons crossing the anti-meridian #9442

Closed
ryanhamley opened this issue Mar 20, 2020 · 0 comments · Fixed by #9440
Closed
Assignees
Labels
Milestone

Comments

@ryanhamley
Copy link
Contributor

mapbox-gl-js version: v1.9.0

browser: any

Steps to Trigger Behavior

  1. create a polygon that stretches across the anti-meridian (international date line)
  2. create a point with a wrapped longitude coordinate inside the polygon (e.g. -185)
  3. set a property of the point to use the within expression
  4. observe that the within expression returns false when it should return true

Link to Demonstration

https://jsfiddle.net/rsh412/r0ycv14w/14/
Screen Shot 2020-03-20 at 12 40 05 PM

Expected Behavior

within recognizes wrapped coordinates and returns the proper boolean result for the feature

Actual Behavior

within does not recognize wrapped coordinates

@zmiao is working on a fix in #9440

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 a pull request may close this issue.

2 participants