|
1 rok temu | |
---|---|---|
.. | ||
analysis | 2 lat temu | |
applications | 2 lat temu | |
arcade | 2 lat temu | |
assets | 1 rok temu | |
chunks | 2 lat temu | |
core | 2 lat temu | |
exports | 2 lat temu | |
form | 2 lat temu | |
geohash | 2 lat temu | |
geometry | 2 lat temu | |
ground | 2 lat temu | |
identity | 2 lat temu | |
intl | 2 lat temu | |
layers | 2 lat temu | |
libs | 2 lat temu | |
networks | 2 lat temu | |
popup | 2 lat temu | |
portal | 2 lat temu | |
properties | 2 lat temu | |
renderers | 2 lat temu | |
rest | 2 lat temu | |
smartMapping | 2 lat temu | |
statistics | 2 lat temu | |
support | 2 lat temu | |
symbols | 2 lat temu | |
tasks | 2 lat temu | |
views | 2 lat temu | |
webdoc | 2 lat temu | |
webmap | 2 lat temu | |
webscene | 2 lat temu | |
widgets | 2 lat temu | |
.DS_Store | 1 rok temu | |
AggregateGraphic.js | 2 lat temu | |
Basemap.d.ts | 2 lat temu | |
Basemap.js | 2 lat temu | |
Camera.d.ts | 2 lat temu | |
Camera.js | 2 lat temu | |
Color.d.ts | 2 lat temu | |
Color.js | 2 lat temu | |
EULA.pdf | 2 lat temu | |
Graphic.d.ts | 2 lat temu | |
Graphic.js | 2 lat temu | |
Ground.d.ts | 2 lat temu | |
Ground.js | 2 lat temu | |
Map.d.ts | 2 lat temu | |
Map.js | 2 lat temu | |
PopupTemplate.d.ts | 2 lat temu | |
PopupTemplate.js | 2 lat temu | |
README.md | 2 lat temu | |
TimeExtent.d.ts | 2 lat temu | |
TimeExtent.js | 2 lat temu | |
TimeInterval.d.ts | 2 lat temu | |
TimeInterval.js | 2 lat temu | |
Viewpoint.d.ts | 2 lat temu | |
Viewpoint.js | 2 lat temu | |
WebMap.d.ts | 2 lat temu | |
WebMap.js | 2 lat temu | |
WebScene.d.ts | 2 lat temu | |
WebScene.js | 2 lat temu | |
arcade.d.ts | 2 lat temu | |
arcade.js | 2 lat temu | |
assets.js | 2 lat temu | |
colorUtils.js | 2 lat temu | |
config.d.ts | 2 lat temu | |
config.js | 2 lat temu | |
copyright.txt | 2 lat temu | |
geometry.d.ts | 2 lat temu | |
geometry.js | 2 lat temu | |
interfaces.d.ts | 2 lat temu | |
intl.d.ts | 2 lat temu | |
intl.js | 2 lat temu | |
kernel.d.ts | 2 lat temu | |
kernel.js | 2 lat temu | |
package.json | 2 lat temu | |
pointCloudRenderers.d.ts | 2 lat temu | |
pointCloudRenderers.js | 2 lat temu | |
rasterRenderers.d.ts | 2 lat temu | |
rasterRenderers.js | 2 lat temu | |
renderers.d.ts | 2 lat temu | |
renderers.js | 2 lat temu | |
request.d.ts | 2 lat temu | |
request.js | 2 lat temu | |
symbols.d.ts | 2 lat temu | |
symbols.js | 2 lat temu |
A minified, unbuilt version of the ArcGIS API for JavaScript ES modules.
For an overview of the API, visit the developer documentation site.
You can install these modules with npm and then use them 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.
The API includes TypeScript type definitions. The .d.ts
declaration files are bundled with the install.
Sample applications can be found at github.com/jsapi-resources/.
Install the modules into your project:
npm install @arcgis/core
Set the CSS to the same version as the installed API modules. You can verify the installed API version by running npm list @arcgis/core
. If you are working with local assets skip to the Manage assets locally section.
The first example shows importing CSS for production API version 4.25.0
:
index.css
@import "https://js.arcgis.com/4.25/@arcgis/core/assets/esri/themes/light/main.css";
The second example shows importing CSS for next
API version 4.25.0-next.20220921
:
index.css
@import "https://cdn.jsdelivr.net/npm/@arcgis/core@4.25.0-next.20220921/assets/esri/themes/light/main.css";
For more information using the next
version visit the feedback-js-api-next repository.
The default configuration for local builds is to automatically pull the APIs assets from a CDN at runtime, there is no need for additional configuration. The assets include styles, images, web workers, wasm and localization files. Production versions of the API's assets are hosted on the ArcGIS CDN, and next
builds (e.g. 4.25.0-next.20220921
) use assets hosted on the jsDelivr CDN.
If you need to manage the assets locally, copy them into your project from /node_modules/@arcgis/core/assets
, and then set config.assetsPath
to insure requests for assets are resolved correctly. A simple way to accomplish this is to configure an npm script that runs during your build process. For example, use npm to install ncp
and configure a script in package.json to copy the folder.
Important: Every time you upgrade the API, be sure to recopy the new version of the assets to your project. This ensures the assets stay synchronized with the API.
Here’s a React example:
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"
}
}
App.js
import esriConfig from "@arcgis/core/config.js";
esriConfig.assetsPath = "./assets";
index.css
@import "@arcgis/core/assets/esri/themes/light/main.css";
For Angular, copy the asset files by configuring the architect/build/options/assets
section of angular.json
, for example:
angular.json
{
"assets": [
{
"glob": "**/*",
"input": "node_modules/@arcgis/core/assets",
"output": "/assets/"
}
]
}
app.component.ts
import esriConfig from "@arcgis/core/config.js";
esriConfig.assetsPath = "./assets";
app.component.css
@import "@arcgis/core/assets/esri/themes/light/main.css";
For other installations, consider using this npm 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.
Use of the ArcGIS API for JavaScript is subject to the terms described in the product-specific terms of use. Learn more about licensing here.
COPYRIGHT © 2022 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.
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