@arcgis/core
ArcGIS API for JavaScript ES modules.
This version of the API is currently in development and is not intended for use in production applications.
Features
This is a minified, unbuilt version of the ArcGIS API for JavaScript. You can install this repo via npm and then use the modules directly in a framework such as React, Vue.js or Angular. Or, you can also create your own custom builds with Webpack or rollup.js.
Instructions
npm install @arcgis/core
The styles, images, fonts, and localization files are located in the @arcgis/core/assets
folder and will need to be copied to your build folder. There are various ways to accomplish this depending on your build tooling, below are several code snippets demonstrating the concept. Sample applications can be found here.
For React, use ncp
to copy the asset files to the build directory:
# package.json
{
"scripts": {
"start": "ncp ./node_modules/@arcgis/core/assets ./public/assets && react-scripts start",
"build": "ncp ./node_modules/@arcgis/core/assets ./public/assets && react-scripts build",
. . .
},
}
For Angular, configure copying asset files using the architect/build/options/assets
section of angular.json
# angular.json
{
"assets": [
{
"glob": "**/*",
"input": "node_modules/@arcgis/core/assets",
"output": "/assets/"
},
. . .
],
}
For other installations, consider using this package script as a starting point:
# package.json
{
"script": {
"copy": "cp -R ./node_modules/@arcgis/core/assets ./dist/assets"
}
}
Windows users can use xcopy
or ncp
for any platform.
Requirements
Building apps with the ArcGIS API for JavaScript requires signing up for a ArcGIS Developer Subscription.
Resources
Issues
Report issues for @arcgis/core at https://github.com/Esri/feedback-js-api-next/issues/new/choose
Licensing
COPYRIGHT © 2020 Esri
All rights reserved under the copyright laws of the United States
and applicable international laws, treaties, and conventions.
This material is licensed for use under the Esri Master License
Agreement (MLA), and is bound by the terms of that agreement.
You may redistribute and use this code without modification,
provided you adhere to the terms of the MLA and include this
copyright notice.
See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
For additional information, contact:
Environmental Systems Research Institute, Inc.
Attn: Contracts and Legal Services Department
380 New York Street
Redlands, California, USA 92373
USA
email: contracts@esri.com
See copyright.txt for details.