You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How about changing loadGeometry() instead? We could have it do classification if type == 3, and return geometry with one more level of array nesting. This would require a major version change for vector-tile-js, but would allow us to remove classify_rings.js from gl-js, rather than duplicating it in both modules.
Then toGeoJSON could inherit the classification behavior, and check the number of polygons to determine whether to use "type": "Polygon" or "type": "MultiPolygon".
MultiPolygons are flattened in VT, so we need to infer their structure from winding order like this https://github.com/mapbox/mapbox-gl-js/blob/earcut-final/js/util/classify_rings.js, otherwise MultiPolygons are broken (encoded as Polygons, with additional outer rings becoming holes). cc @jfirebaugh
The text was updated successfully, but these errors were encountered: