uber / nebula.gl

A suite of 3D-enabled data editing overlays, suitable for deck.gl
https://nebula.gl/
Other
688 stars 166 forks source link

Editing a polygon with a hole in it doesn't recognize or allow editing the hole #344

Open kjkurtz opened 4 years ago

kjkurtz commented 4 years ago

Describe the bug

When adding a geojson Polygon with a hole ring in it to react-map-gl-draw, it doesn't recognize the inner ring of the Polygon as a 'hole' and simply disregards it. This is not now it works when using the vanilla mapbox-gl-draw library.

Actual Result

Only the outer ring of the Polygon shows when in EDITING mode even though the inner ring is still part of the geojson.

Expected Result

Just like vanilla mapbox-gl-draw does, I'd expect every lat/lon on the inner ring of the polygon to also render editable nodes.

Reproduce Steps

xintongxia commented 4 years ago

Polygon with holes are not supported at the moment.

supersonicclay commented 4 years ago

They are not supported with react-map-gl-draw. However, they are supported with the deck.gl-based EditableGeoJsonLayer. https://nebula.gl/docs/api-reference/layers/editable-geojson-layer