Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@nebula.gl/layers
Advanced tools
nebula.gl provides editable and interactive map overlay layers, built using the power of deck.gl.
git clone git@github.com:uber/nebula.gl.git
cd nebula.gl
yarn
cd examples/advanced
yarn
export MapboxAccessToken='<Add your key>'
yarn start-local
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]} />;
}
}
0.16.0 - 2019-09-25
getEditHandlePointOutlineColor
_subLayerProps
(#284)EditableGeoJsonLayer
featureIndexes
is now nested under editContext.featureIndexes
in parameter passed to onEdit
callbackproperties.editHandleType
instead of type
for edit handle styling accessors:
getEditHandlePointColor
getEditHandlePointRadius
getEditHandleIcon
getEditHandleIconSize
getEditHandleIconColor
getEditHandleIconAngle
mode
prop is intended to take a constructor or instance rather than a string.
import {DrawPolygonMode} from 'nebula.gl'; new EditableGeoJsonLayer({mode: DrawPolygonMode})
editHandleType
no longer supports passing a function/constructor. Use _subLayerProps
instead.editHandleParameters
removed. Use _subLayerProps
instead.editHandleLayerProps
removed. Use _subLayerProps
instead.ModeHandler
and GeoJsonEditMode
If you built a custom ModeHandler
, note the following breaking changes:
GeoJsonEditMode
instead of ModeHandler
props
parameter with the state, so use props
rather than this.get...()
(e.g. this.getFeatureCollection()
, this.getModeConfig()
, etc).handleClick
props.onEdit
instead of returning an EditAction
handlePointerMove
props.onEdit
instead of returning an EditAction
event.sourceEvent.stopPropagation()
instead of returning {cancelMapPan: true}
handleStartDragging
props.onEdit
instead of returning an EditAction
handleStopDragging
props.onEdit
instead of returning an EditAction
getGuides
instead of getEditHandles
getGuides
instead of calling this._setTentativeFeature()
getCursor
getCursor
function, call props.onUpdateCursor
groundCoords
renamed to mapCoords
in event objectsFAQs
A suite of 3D-enabled data editing layers, suitable for deck.gl
The npm package @nebula.gl/layers receives a total of 12,452 weekly downloads. As such, @nebula.gl/layers popularity was classified as popular.
We found that @nebula.gl/layers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.