Install and set up
Accessing the API
AMD modules via ArcGIS CDN
The most common approach for accessing the API is to use the hosted version. Reference the API and CSS from our CDN to start using the API in your app.
<link rel="stylesheet" href="https://js.arcgis.com/4.26/esri/themes/light/main.css"> <script src="https://js.arcgis.com/4.26/"></script>
ES modules via NPM
npm install @arcgis/core
Then import modules:
import Map from "@arcgis/core/Map.js";
For more information, see these guides:
ES modules via CDN
Note: This approach is currently only recommended for development and prototyping.
<link rel="stylesheet" href="https://js.arcgis.com/4.26/@arcgis/core/assets/esri/themes/light/main.css"> <script type="module"> import Map from "https://js.arcgis.com/4.26/@arcgis/core/Map.js"; // Use the Map class </script>
AMD modules hosted locally
In some cases, you may need to use a locally hosted version of the AMD modules via ArcGIS CDN. An example of this is when you are working in a restricted network environment with no internet access. You can also download and install the documentation which includes the API Reference, tutorials, and samples. The documentation available for download is a snapshot from the release date of version 4.26 and will not include the latest sample updates, documentation fixes, etc.
Web server hosting configuration
|True Type Fonts|
|Web Open Font Format|
|WOFF File Format 2.0|
Note that a web server supporting
HTTPS requires the web server to use an SSL web server certificate.