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

GeoJSON polygon rendering is sensitive to ring winding order #1202

Closed
MelnikVasya opened this issue May 12, 2015 · 3 comments
Closed

GeoJSON polygon rendering is sensitive to ring winding order #1202

MelnikVasya opened this issue May 12, 2015 · 3 comments

Comments

@MelnikVasya
Copy link

I add geojson to map https://jsfiddle.net/v0best2f/1/ and hole is filled
http://geojsonlint.com/
screen shot 2015-05-12 at 4 24 40 pm
mapbox-gl
screen shot 2015-05-12 at 4 25 47 pm

@mourner
Copy link
Member

mourner commented May 12, 2015

Thanks, we'll look into this.

@mourner
Copy link
Member

mourner commented May 12, 2015

OK found the issue. Apparently our GeoJSON implementation is sensitive to winding order. If you reverse the order of the second ring like here https://jsfiddle.net/v0best2f/3/, it works properly.

We can fix this pretty easily on mapbox-gl-js side, although the fix will become obsolete after #682 where this is handled differently.

@mourner mourner self-assigned this May 12, 2015
@mourner mourner changed the title Fill polygon hole in geojson GeoJSON polygon rendering is sensitive to ring winding order May 12, 2015
@ansis
Copy link
Contributor

ansis commented Mar 21, 2016

This is fixed by #2285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants