不会爬树的猴 517a89e3c6 增加涂鸦绘制功能 1 gadu atpakaļ
..
analysis 1f41508d80 错误更改 2 gadi atpakaļ
applications 1f41508d80 错误更改 2 gadi atpakaļ
arcade 1f41508d80 错误更改 2 gadi atpakaļ
assets 517a89e3c6 增加涂鸦绘制功能 1 gadu atpakaļ
chunks 1f41508d80 错误更改 2 gadi atpakaļ
core 1f41508d80 错误更改 2 gadi atpakaļ
exports 1f41508d80 错误更改 2 gadi atpakaļ
form 1f41508d80 错误更改 2 gadi atpakaļ
geohash 1f41508d80 错误更改 2 gadi atpakaļ
geometry 1f41508d80 错误更改 2 gadi atpakaļ
ground 1f41508d80 错误更改 2 gadi atpakaļ
identity 1f41508d80 错误更改 2 gadi atpakaļ
intl 1f41508d80 错误更改 2 gadi atpakaļ
layers 1f41508d80 错误更改 2 gadi atpakaļ
libs 1f41508d80 错误更改 2 gadi atpakaļ
networks 1f41508d80 错误更改 2 gadi atpakaļ
popup 1f41508d80 错误更改 2 gadi atpakaļ
portal 1f41508d80 错误更改 2 gadi atpakaļ
properties 1f41508d80 错误更改 2 gadi atpakaļ
renderers 1f41508d80 错误更改 2 gadi atpakaļ
rest 1f41508d80 错误更改 2 gadi atpakaļ
smartMapping 1f41508d80 错误更改 2 gadi atpakaļ
statistics 1f41508d80 错误更改 2 gadi atpakaļ
support 1f41508d80 错误更改 2 gadi atpakaļ
symbols 1f41508d80 错误更改 2 gadi atpakaļ
tasks 1f41508d80 错误更改 2 gadi atpakaļ
views 1f41508d80 错误更改 2 gadi atpakaļ
webdoc 1f41508d80 错误更改 2 gadi atpakaļ
webmap 1f41508d80 错误更改 2 gadi atpakaļ
webscene 1f41508d80 错误更改 2 gadi atpakaļ
widgets 1f41508d80 错误更改 2 gadi atpakaļ
.DS_Store 517a89e3c6 增加涂鸦绘制功能 1 gadu atpakaļ
AggregateGraphic.js 1f41508d80 错误更改 2 gadi atpakaļ
Basemap.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
Basemap.js 1f41508d80 错误更改 2 gadi atpakaļ
Camera.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
Camera.js 1f41508d80 错误更改 2 gadi atpakaļ
Color.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
Color.js 1f41508d80 错误更改 2 gadi atpakaļ
EULA.pdf 22729588bd AA 2 gadi atpakaļ
Graphic.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
Graphic.js 1f41508d80 错误更改 2 gadi atpakaļ
Ground.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
Ground.js 1f41508d80 错误更改 2 gadi atpakaļ
Map.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
Map.js 1f41508d80 错误更改 2 gadi atpakaļ
PopupTemplate.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
PopupTemplate.js 1f41508d80 错误更改 2 gadi atpakaļ
README.md 1f41508d80 错误更改 2 gadi atpakaļ
TimeExtent.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
TimeExtent.js 1f41508d80 错误更改 2 gadi atpakaļ
TimeInterval.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
TimeInterval.js 1f41508d80 错误更改 2 gadi atpakaļ
Viewpoint.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
Viewpoint.js 1f41508d80 错误更改 2 gadi atpakaļ
WebMap.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
WebMap.js 1f41508d80 错误更改 2 gadi atpakaļ
WebScene.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
WebScene.js 1f41508d80 错误更改 2 gadi atpakaļ
arcade.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
arcade.js 1f41508d80 错误更改 2 gadi atpakaļ
assets.js 1f41508d80 错误更改 2 gadi atpakaļ
colorUtils.js 1f41508d80 错误更改 2 gadi atpakaļ
config.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
config.js 1f41508d80 错误更改 2 gadi atpakaļ
copyright.txt 1f41508d80 错误更改 2 gadi atpakaļ
geometry.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
geometry.js 1f41508d80 错误更改 2 gadi atpakaļ
interfaces.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
intl.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
intl.js 1f41508d80 错误更改 2 gadi atpakaļ
kernel.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
kernel.js 1f41508d80 错误更改 2 gadi atpakaļ
package.json 1f41508d80 错误更改 2 gadi atpakaļ
pointCloudRenderers.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
pointCloudRenderers.js 1f41508d80 错误更改 2 gadi atpakaļ
rasterRenderers.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
rasterRenderers.js 1f41508d80 错误更改 2 gadi atpakaļ
renderers.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
renderers.js 1f41508d80 错误更改 2 gadi atpakaļ
request.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
request.js 1f41508d80 错误更改 2 gadi atpakaļ
symbols.d.ts 1f41508d80 错误更改 2 gadi atpakaļ
symbols.js 1f41508d80 错误更改 2 gadi atpakaļ

README.md

@arcgis/core

A minified, unbuilt version of the ArcGIS API for JavaScript ES modules.

Features

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/.

Get started

Install the modules into your project:

npm install @arcgis/core

Configure CSS

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.

Working with assets

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.

Manage assets locally

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.

Requirements

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.

Resources

Issues

Licensing

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