Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

141
Visualizações
Why Nebula.gl didn't save the drawpolygon geojson?

I am trying to setup Nebulagl with Deck.gl without React. However after draw a polygon, the line was dissapear. I am writing with class style. I think the geojson not updated after editableGeojasenlayer after I console.

    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;
  }
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda