Get started

  1. Install and set up the API
  2. Get an API key (access services)
  3. Start the Display a map (2D) tutorial

1. Install and set up

Multiple options exist for bringing the ArcGIS Maps SDK for JavaScript into your app. The most common way is to use the AMD modules via ArcGIS CDN, and you can also use ES modules for local builds.

For AMD modules, use these script tags:

Use dark colors for code blocksCopy
1
2
<link rel="stylesheet" href="https://js.arcgis.com/4.29/esri/themes/light/main.css">
<script src="https://js.arcgis.com/4.29/"></script>

For ES modules, install the modules using npm in a terminal window:

Use dark colors for code blocksCopy
1
npm install @arcgis/core

And, for the CSS, use @import url:

Use dark colors for code blocksCopy
1
2
/* CSS url as a string */
@import "https://js.arcgis.com/4.29/@arcgis/core/assets/esri/themes/light/main.css";

For more information, see Install and set up.

2. Get an API key

API keys are required to access ArcGIS services, such as basemaps, geocoding, and routing. Visit your dashboard and copy your default API key, or set custom scopes and referrers for your specific needs. Include your API key in the tutorials and samples when required in the instructions. You can use a global API key, as well as more fine-grained API keys on specific classes.

  1. Log in to your dashboard.
  2. Copy your default API key, or generate a new one.

3. Tutorials

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.