8000 GitHub - slavaGanzin/arcgis-js-api: Minified version of the ArcGIS API for JavaScript
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

slavaGanzin/arcgis-js-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arcgis-js-api

A minified, unbuilt version of the ArcGIS Maps SDK for JavaScript AMD modules.

⚠️ Repository Archive Notice
This repository will be archived at 4.26 (Early 2023) and then removed in a future release. All versions will continue to be available for install on NPM: https://www.npmjs.com/package/arcgis-js-api

Features

For an overview of the SDK, 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 SDK 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 SDK modules. You can verify the installed SDK 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 SDK 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 SDK version 4.19.0-next.20210324:

index.css

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

Working with assets

The default configuration for local builds is for the SDK to automatically pull 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 SDK'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 SDK, be sure to recopy the new version of the assets to your project. This ensures the assets stay synchronized.

Here’s a React example:

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

If you are starting a new project, we recommend using @arcgis/core ES modules.

Features

You can install these modules with npm and create your own custom builds, for example you can use RequireJS or the Dojo Toolkit.

Instructions

Additional instructions and examples are available in the SDK's Build with AMD modules Guide page.

npm install arcgis-js-api

TypeScript Typings

You can use the typings included with arcgis-js-api two ways. The first way is to include a /// directive in your main TypeScript file:

main.ts

/// <reference types="arcgis-js-api" />

Or, add a reference to the declaration file in the include of your tsconfig.json:

tsconfig.json

{
  "include": [
    "node_modules/arcgis-js-api/index.d.ts",
    "src/**/*.ts",
    "src/**/*.tsx"
  ]
}

Requirements

Use of the ArcGIS Maps SDK 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

About

Minified version of the ArcGIS API for JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 57.2%
  • SCSS 41.4%
  • CSS 1.4%
0