Get the API
The ArcGIS API for JavaScript is available to developers in several ways. The most common way is to use the CDN version. See below for more info and alternatives. Note: The code for the ArcGIS API for JavaScript cannot be modified.
CDN (hosted version)
The recommended approach for accessing the API is to use the hosted version. Reference the API from our CDN (content delivery network) and you are ready to get started.
<link rel="stylesheet" href="https://js.arcgis.com/4.4/esri/css/main.css">
<script src="https://js.arcgis.com/4.4/"></script>
Benefits to working with the hosted version of the API:
- Delivered via a content delivery network (CDN). CDN's are a collection of geographically distributed web servers that deliver content efficiently.
- The servers are load balanced and monitored 24/7.
- No need to download and re-install the API when new versions are released. You just need to modify the script tag in your application to point to the new version.
Using Bower for custom builds
Using Bower (a package manager for front-end web development) is another option for developers of the JavaScript API to generate custom builds of the ArcGIS API for JavaScript. Some advanced scenarios require the ability to create custom builds of the JavaScript API locally. Many developers are already using Node.js build tools such as Grunt, Gulp, or npm (see: npm-run-script
, npm-scripts
) for solving automation workflow issues such as continuous integration. In addition, some developers just want to have more control over their build environment, and other developers have requirements to use other AMD loaders such RequireJS. For more information see the arcgis-js-api build tools topic in the jsapi-resources repo on GitHub, the blog article titled Using Bower for custom builds of the ArcGIS API for JavaScript, and read the Using Bower for custom builds topic.
Download
In some cases, you may need to use a locally hosted version of the JavaScript API, for example, if you are in a restricted network environment with no internet access. You can also download and install the SDK which includes the Guide, API reference, Sample Code, and documentation. The SDK available for download is a snapshot of the help from the release date of the ArcGIS API for JavaScript version 4.4 and will not include any sample updates, documentation fixes etc.
To download and install the ArcGIS API for JavaScript and SDK navigate to the ArcGIS API for JavaScript download page and log-in with your Esri global account.
Note: If you do not have access to the internet, contact Esri Customer Service to have a DVD mailed.