Estoy tratando de configurar Nebulagl con Deck.gl sin React. Sin embargo, después de dibujar un polígono, la línea desapareció. Estoy escribiendo con estilo de clase. Creo que el geojson no se actualizó después de editableGeojasenlayer Geojasenlayer después de la consola.
export class Panel { constructor(viewer, container, id, title, options) { const layers = this.getLayers(); const editableGeoJsonLayer = layers[0]; this.deck = new Deck({ initialViewState: INITIAL_VIEW_STATE, canvas: "deck", width: 300, height: 300, layers: layers, controller: { doubleClickZoom: false, }, getCursor: editableGeoJsonLayer.getCursor.bind(editableGeoJsonLayer), }); } getLayers() { const COUNTRIES = "https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_admin_0_scale_rank.geojson"; //eslint-disable-line let myFeatureCollection = { type: "FeatureCollection", features: [], }; const layers = [ new EditableGeoJsonLayer({ id: "nebula", data: myFeatureCollection, selectedFeatureIndexes: [], mode: DrawPolygonMode, onEdit: ({ updatedData }) => { myFeatureCollection = updatedData; this.deck.setProps({ layers: this.getLayers() }); }, }), ]; return layers; }