Skip to content
A suite of 3D-enabled data editing overlays, suitable for deck.gl
Branch: master
Clone or download
contra and supersonicclay fix: remove extraneous console.log (#201)
SelectionLayer was logging props on every render
Latest commit 33cf068 Apr 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Nov 21, 2018
cypress cypress first test Mar 28, 2019
dev-docs/RFCs/v1.0 More flexible EditAction type (#161) Feb 13, 2019
docs Add support to SnappableHandler to pick from other layers (#199) Apr 11, 2019
examples
flow-typed/npm Stronger typing (#79) Sep 19, 2018
modules
scripts
static
test eslintrc ignore import extensions Jun 5, 2018
website-old Initial gatsby website structure (#186) Mar 22, 2019
website Initial gatsby website structure (#186) Mar 22, 2019
.eslintignore Initial release Jun 4, 2018
.eslintrc.js eslintrc ignore import extensions Jun 5, 2018
.flowconfig
.gitattributes Create @nebula.gl/overlays (#182) Mar 18, 2019
.gitignore Create @nebula.gl/layers (#189) Mar 21, 2019
.travis.yml Setup coveralls (#191) Mar 21, 2019
CHANGELOG.md v0.11.2 Apr 11, 2019
LICENSE
README.md update README.md and CHANGELOG.md Mar 21, 2019
babel.config.js Upgrade babel versions (#83) Sep 24, 2018
cypress.json cypress first test Mar 28, 2019
jest.config.js add textarea to examples/deck Mar 26, 2019
lerna.json
package.json Fix lint does not work with modules (#198) Apr 6, 2019
prettier.config.js Initial release Jun 4, 2018
publish-docs.sh
yarn.lock

README.md

version version version build coveralls

Nebula.gl | Website

An editing framework for deck.gl

docs

Getting started

Running the example

  1. git clone git@github.com:uber/nebula.gl.git
  2. cd nebula.gl
  3. yarn
  4. cd examples/deck
  5. yarn
  6. export MapboxAccessToken='<Add your key>'
  7. yarn start-local
  8. You can view/edit geometry.

Installation

yarn add nebula.gl

nebula.gl will automatically install a compatible version of deck.gl.

EditableGeoJsonLayer

The Editable GeoJSON layer accepts a GeoJSON FeatureCollection and renders the features as editable polygons, lines, and points. See the example below and for the official documentation click here.

import DeckGL from 'deck.gl';
import { EditableGeoJsonLayer } from 'nebula.gl';

const myFeatureCollection = {
  type: 'FeatureCollection',
  features: [
    /* insert features here */
  ]
};

class App extends React.Component {
  state = {
    mode: 'modify',
    selectedFeatureIndexes: [0],
    data: myFeatureCollection
  };

  render() {
    const layer = new EditableGeoJsonLayer({
      id: 'geojson-layer',
      data: this.state.data,
      mode: this.state.mode,
      selectedFeatureIndexes: this.state.selectedFeatureIndexes,

      onEdit: ({ updatedData }) => {
        this.setState({
          data: updatedData,
        });
      }
    });

    return <DeckGL {...this.props.viewport} layers={[layer]} />;
  }
}
You can’t perform that action at this time.