nebula.gl icon indicating copy to clipboard operation
nebula.gl copied to clipboard

React Map GL Draw - initial features not editable

Open Kieran-Lynn opened this issue 4 years ago • 6 comments

Describe the bug

When supplying features to the features prop with the editor mode, they are no longer editable

This has been brought up and fixed before but its broken again https://github.com/uber/nebula.gl/issues/274 https://github.com/uber/nebula.gl/issues/295

Actual Result

You can add vertices to polygons but cannot drag them around

Expected Result

You should be able to edit vertices

Reproduce Steps

This sandbox was provided by @xintongxia to show it working, All you have to do is update the dependency in the sandbox project to the latest version to see it break. https://codesandbox.io/s/react-map-gl-draw-with-initial-features-m0e97?file=/src/App.js

Screenshots

To Do List

  • [ ] Add label and assign to milestone
  • [ ] Coding
  • [ ] Test

Kieran-Lynn avatar Oct 18 '21 16:10 Kieran-Lynn

Same issue here

sharathprabhal avatar Dec 15 '21 22:12 sharathprabhal

This might be a duplicate of uber/nebula.gl#580. so maybe a downgrade to 0.21.1 is a workaround in the meantime.

maxnowack avatar Dec 15 '21 22:12 maxnowack

HI guys, Was that ever resolved. Any one knows ehat is the latest stable version that can give us basics functioanlity ?

cubecleveland avatar Jan 17 '22 11:01 cubecleveland

@cubecleveland I've assigned the issue to myself. Before switching to EditableGeojsonLayer we used "react-map-gl-draw": "0.14.8".

igorDykhta avatar Jan 17 '22 11:01 igorDykhta

Thanks so much, as ive said we are swithcing form the leaflet impleentation.

We have no issue to move to deck Gl. are u saying that it is better to switch completely to use Deck Gl and nebula and leave the react map gl implementation? Is there any working simple version i can tap into?

cubecleveland avatar Jan 17 '22 11:01 cubecleveland

@cubecleveland We switched to EditableGeojsonLayer in order to get more flexibility with events. Both modules should be very similar, but EditableGeojsonLayer requires more setup and extra logic.

examples/editor examples/react-map-gl-draw

igorDykhta avatar Jan 17 '22 11:01 igorDykhta