Open kjkurtz opened 4 years ago
Polygon with holes are not supported at the moment.
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
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
Editor
and get a ref to it.addFeatures
Screenshots
This is now vanilly mapbox-gl with mapbox-gl-draw behaves and what I'd expect:
This is now react-map-gl-draw behaves. Note the missing nodes on the inner ring:
Both of these are using the EXACT same geojson.
To Do List