Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nebula.gl/layers

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nebula.gl/layers

A suite of 3D-enabled data editing layers, suitable for deck.gl

  • 0.15.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

version version

version version version

build coveralls

nebula.gl | Website

An editing framework for deck.gl

docs

nebula.gl provides editable and interactive map overlay layers, built using the power of deck.gl.

Getting started

Running the example

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

Installation

yarn add nebula.gl

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

EditableGeoJsonLayer

EditableGeoJsonLayer is implemented as a deck.gl layer. It provides the ability to view and edit multiple types of geometry formatted as GeoJSON (an open standard format for geometry) including polygons, lines, and points.

import React from 'react';
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: 'drawPolygon',
    selectedFeatureIndexes: [],
    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]} />;
  }
}

Keywords

FAQs

Package last updated on 16 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc