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

why does this fail? #83

Closed
robertleeplummerjr opened this issue May 28, 2017 · 1 comment · Fixed by mapbox/earcut.hpp#55
Closed

why does this fail? #83

robertleeplummerjr opened this issue May 28, 2017 · 1 comment · Fixed by mapbox/earcut.hpp#55
Labels

Comments

@robertleeplummerjr
Copy link

var verticies = JSON.parse("[[-72.63590100318186,41.903199002174524],[-72.63589899863476,41.90319900010549],[-72.63589800335812,41.903200000183766],[-72.63589999913334,41.90320000088696],[-72.63590100318186,41.903199002174524],[-72.65286999984018,41.904495999513564],[-72.65286999650422,41.904495000715706],[-72.65272300000595,41.90442700108841],[-72.6527230033396,41.90442799988625],[-72.65286999984018,41.904495999513564],[-73.07008199661202,42.087010997932936],[-73.06877799682555,42.08418999911852],[-73.06455500243456,42.075341999930394],[-73.06337700018447,42.072873001420284],[-73.06237399563176,42.07077099972576]]");
var holes = [1, 2];
var dimensions = 5;
earcut(verticies, holes, dimensions);
@robertleeplummerjr
Copy link
Author

To answer my own question, because this returns null: https://github.com/mapbox/earcut/blob/master/src/earcut.js#L74

And this doesn't check for if it is null:
https://github.com/mapbox/earcut/blob/master/src/earcut.js#L267

Could this be resolved with?:

        outerNode = filterPoints(outerNode, outerNode.next) || outerNode;

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