Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!