There was an error while loading. Please reload this page.
This layer can be used to select deck.gl objects using mouse drawing.
layers.push( new SelectionLayer({ id: 'selection', selectionType: this.state.selectionTool, onSelect: ({ pickingInfos }) => { this.setState({ selectedFeatureIndexes: pickingInfos.map(pi => pi.index) }); }, layerIds: ['geojson'], getTentativeFillColor: () => [255, 0, 255, 100], getTentativeLineColor: () => [0, 0, 255, 255], getTentativeLineDashArray: () => [0, 0], lineWidthMinPixels: 3 }) );
Inherits all deck.gl's Base Layer properties.
Also inherites some EditableGeoJsonLayer properties.
Note: do not pass a data property.
selectionType
null
SELECTION_TYPE.RECTANGLE or SELECTION_TYPE.POLYGON
onSelect
Called when selection is completed.
layerIds
Array of layer ids where we will search.
Sidebar