不会爬树的猴 22729588bd AA 2 жил өмнө
..
analysis 22729588bd AA 2 жил өмнө
applications 22729588bd AA 2 жил өмнө
arcade 22729588bd AA 2 жил өмнө
assets 22729588bd AA 2 жил өмнө
chunks 22729588bd AA 2 жил өмнө
core 22729588bd AA 2 жил өмнө
exports 22729588bd AA 2 жил өмнө
form 22729588bd AA 2 жил өмнө
geohash 22729588bd AA 2 жил өмнө
geometry 22729588bd AA 2 жил өмнө
ground 22729588bd AA 2 жил өмнө
identity 22729588bd AA 2 жил өмнө
intl 22729588bd AA 2 жил өмнө
layers 22729588bd AA 2 жил өмнө
libs 22729588bd AA 2 жил өмнө
networks 22729588bd AA 2 жил өмнө
popup 22729588bd AA 2 жил өмнө
portal 22729588bd AA 2 жил өмнө
properties 22729588bd AA 2 жил өмнө
renderers 22729588bd AA 2 жил өмнө
rest 22729588bd AA 2 жил өмнө
smartMapping 22729588bd AA 2 жил өмнө
statistics 22729588bd AA 2 жил өмнө
support 22729588bd AA 2 жил өмнө
symbols 22729588bd AA 2 жил өмнө
tasks 22729588bd AA 2 жил өмнө
views 22729588bd AA 2 жил өмнө
webdoc 22729588bd AA 2 жил өмнө
webmap 22729588bd AA 2 жил өмнө
webscene 22729588bd AA 2 жил өмнө
widgets 22729588bd AA 2 жил өмнө
AggregateGraphic.js 22729588bd AA 2 жил өмнө
Basemap.d.ts 22729588bd AA 2 жил өмнө
Basemap.js 22729588bd AA 2 жил өмнө
Camera.d.ts 22729588bd AA 2 жил өмнө
Camera.js 22729588bd AA 2 жил өмнө
Color.d.ts 22729588bd AA 2 жил өмнө
Color.js 22729588bd AA 2 жил өмнө
EULA.pdf 22729588bd AA 2 жил өмнө
Graphic.d.ts 22729588bd AA 2 жил өмнө
Graphic.js 22729588bd AA 2 жил өмнө
Ground.d.ts 22729588bd AA 2 жил өмнө
Ground.js 22729588bd AA 2 жил өмнө
Map.d.ts 22729588bd AA 2 жил өмнө
Map.js 22729588bd AA 2 жил өмнө
PopupTemplate.d.ts 22729588bd AA 2 жил өмнө
PopupTemplate.js 22729588bd AA 2 жил өмнө
README.md 22729588bd AA 2 жил өмнө
TimeExtent.d.ts 22729588bd AA 2 жил өмнө
TimeExtent.js 22729588bd AA 2 жил өмнө
TimeInterval.d.ts 22729588bd AA 2 жил өмнө
TimeInterval.js 22729588bd AA 2 жил өмнө
Viewpoint.d.ts 22729588bd AA 2 жил өмнө
Viewpoint.js 22729588bd AA 2 жил өмнө
WebMap.d.ts 22729588bd AA 2 жил өмнө
WebMap.js 22729588bd AA 2 жил өмнө
WebScene.d.ts 22729588bd AA 2 жил өмнө
WebScene.js 22729588bd AA 2 жил өмнө
arcade.d.ts 22729588bd AA 2 жил өмнө
arcade.js 22729588bd AA 2 жил өмнө
assets.js 22729588bd AA 2 жил өмнө
colorUtils.js 22729588bd AA 2 жил өмнө
config.d.ts 22729588bd AA 2 жил өмнө
config.js 22729588bd AA 2 жил өмнө
copyright.txt 22729588bd AA 2 жил өмнө
geometry.d.ts 22729588bd AA 2 жил өмнө
geometry.js 22729588bd AA 2 жил өмнө
interfaces.d.ts 22729588bd AA 2 жил өмнө
intl.d.ts 22729588bd AA 2 жил өмнө
intl.js 22729588bd AA 2 жил өмнө
kernel.d.ts 22729588bd AA 2 жил өмнө
kernel.js 22729588bd AA 2 жил өмнө
package.json 22729588bd AA 2 жил өмнө
pointCloudRenderers.d.ts 22729588bd AA 2 жил өмнө
pointCloudRenderers.js 22729588bd AA 2 жил өмнө
rasterRenderers.d.ts 22729588bd AA 2 жил өмнө
rasterRenderers.js 22729588bd AA 2 жил өмнө
renderers.d.ts 22729588bd AA 2 жил өмнө
renderers.js 22729588bd AA 2 жил өмнө
request.d.ts 22729588bd AA 2 жил өмнө
request.js 22729588bd AA 2 жил өмнө
symbols.d.ts 22729588bd AA 2 жил өмнө
symbols.js 22729588bd AA 2 жил өмнө

README.md

@arcgis/core

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

Features

You can install these modules via 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.

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.19.0:

index.css

@import "https://js.arcgis.com/4.19/@arcgis/core/assets/esri/themes/light/main.css";

The second example shows importing CSS for next API version 4.19.0-next.20210324:

index.css

@import "https://cdn.jsdelivr.net/npm/@arcgis/core@4.19.0-next.20210324/assets/esri/themes/light/main.css";

Working with assets

For most local builds, the API's assets are automatically pulled from a CDN at runtime and there is no need for additional configuration. The assets include styles, images, web workers, wasm and localization files. Production versions of the API use the ArcGIS CDN, and next builds (e.g. 4.19.0-next.20210324) use jsDelivr, similar to the CSS example above.

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.

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 © 2021 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