Chevron DownAPI Reference

loadArcGISModules

This utility function initializes the classes in this module by loading ArcGIS dependencies. Optionally, it can also load additional dependencies from the esri namespace.

Usage

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

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

    // Create map
  });

Arguments:

loadArcGISModules(modules, loadScriptOptions);
  • modules (Array, optional) - Array of esri modules to load, passed to esri-loader's loadModules
  • loadScriptOptions (Object, optional) - esri-loader options

Returns: a promise that resolves to an object with the following fields:

  • DeckLayer
  • DeckRenderer
  • modules (Array) - if the modules argument was specified, will represent an array of the resolved objects