-
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
Fix winding order for GeoJSON polygons before rendering #2089
Labels
Comments
@mcwhittemore Can you post the GeoJSON that produces the depicted rendering? cc @mourner |
I've noticed this too. Interestingly, it does not happen with the |
We need to enforce winding order for geojson polygons internally. https://github.com/mapbox/geojson-rewind does this |
ansis
added a commit
that referenced
this issue
Mar 17, 2016
ansis
added a commit
that referenced
this issue
Mar 18, 2016
ansis
added a commit
that referenced
this issue
Mar 18, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In mapbox-gl-draw we're seeing a problem where holes are rendered in polygons when we don't expect them to be. At first I thought that this was due to poor winding order management in gl-draw (which is true) but after talking to @sgillies about this a bit today I'm pretty sure mapbox-gl-js is implementing geojson holes incorrectly.
In the above image each new polygon is a its own feature. According to the spec holes happen when a second linear ring is provided to the array of linear ring coordinate arrays.
I'm guessing I can fix this in gl-draw by following the
a linear ring SHOULD follow right-hand rule
command, but still this should be fixed so end users don't get caught up in trying to check if their linear rights follow the right hand rule.The text was updated successfully, but these errors were encountered: