Chevron DownAPI Reference

DeckLayer

This class inherits from the ArcGIS Layer class and can be added to maps created with the ArcGIS API for JavaScript.

DeckLayer is only available when loadArcGISModules() is resolved. At the moment, it only supports 2D integration.

Usage

import {loadArcGISModules} from '@deck.gl/arcgis';

loadArcGISModules([
  'esri/Map',
  'esri/views/MapView'
]).then(({DeckLayer, modules}) => {
  const [ArcGISMap, MapView] = modules;

  const layer = new DeckLayer({
    'deck.layers': [
      // deck.gl layers
    ]
  });

  const mapView = new MapView({
    container: "viewDiv",
    map: new ArcGISMap({
      basemap: "dark-gray-vector",
      layers: [layer]
    }),
    center: [0.119, 52.205],
    zoom: 5
  });
});

Constructor

new DeckLayer(props);

Inherits all properties from the base Layer class.

Property names that start with deck. are forwarded to a Deck instance. The following Deck props are supported:

  • deck.layers
  • deck.layerFilter
  • deck.parameters
  • deck.effects
  • deck.pickingRadius
  • deck.onBeforeRender
  • deck.onAfterRender
  • deck.onClick
  • deck.onHover
  • deck.onDragStart
  • deck.onDrag
  • deck.onDragEnd
  • deck.onError
  • deck.debug
  • deck.drawPickingColors

Members

deck

An ArcGIS Accessor that stores Deck props. The props can be updated after the layer construction:

// Update deck layers
layer.deck.layers = [...]);

// Update multiple deck props
layer.deck.set({
  layers: [...],
  pickingRadius: 5,
  ...
});