I'm trying to implement a basic example to edit GeoJSON polygon features using deck.gl. Layter I need to edit a lot of data, so I want to use nebula.gl, specifically EditableGeoJsonLayer.
My problem basically is that ModifyMode adds additional features instead of editing existing polygons:
onClick: (event) => {
selectedFeatureIndex = event.object ? [event.index] : [];
console.log(event.object, selectedFeatureIndex);
deck.setProps({
layers: [
new EditableGeoJsonLayer({
id: "geojson-layer",
data: COUNTRIES,
pickable: true,
pickingRadius: 10,
autoHighlight: true,
mode: ModifyMode,
selectedFeatureIndexes: selectedFeatureIndexes,
}),
],
});
},
The whole example can be found here.
I'm just starting with nebula and have a problem of understanding the different modes which can be used with EditableGeoJsonLayer.
Just as a note, for now I use plain Javascript. I want to avoid React, as my app where I want to integrate it, runs on vue.js.