I am trying to develop a country guessing game using MapKit and GeoJSON data. When the polygons are generated on the map, an error occurs where the map clips and does not show portions of the countries or islands when the user pinches to zoom in and out. I receive these warnings in the terminal:
“Mismatching number of indices, indexCount: 30, triangulatedIndexCount: 27” and
“Triangulator failed to fully triangulate polygon: (0.1296, 0.303328), (0.108053, 0.296605), (0.0671644, 0.289883), (0.0586311, 0.281121), (0.0397156, 0.27289), (0.0323911, 0.262393), (0.0610489, 0.260732), (0.102507, 0.284671), (0.140053, 0.292602), (0.133511, 0.291167), (0.137707, 0.293659), (0.138489, 0.29872)”
I am not sure what these tuple values are, or how to fix the errors, as I have adjusted my data (removing duplicate coordinates, refreshing the map, etc). How am I able to counteract these warnings, or at least get a sense of what they are asking? I have verified that my data creates the outline of the country properly using other methods(websites to determine validity of GeoJSON data), and all but a handful of countries works fine, no clipping out of the polygon on the map. I would just like some understanding of what I am looking at, and maybe how to tackle it. Thanks
Nick Melekian is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.