diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 3a69c8b..239fd32 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -21,6 +21,6 @@ Please provide: To help you reproduce issues in an environment that we can't access (e.g. private repository) follow these helpful tips: -- If the problem is related to the ArcGIS API (i.e. behavior of the map, etc), start here https://github.com/Esri/esri-loader#without-a-module-bundler. +- If the problem is related to the ArcGIS Maps SDK for JavaScript (i.e. behavior of the map, etc), start here https://github.com/Esri/esri-loader#without-a-module-bundler. - Otherwise, search for and fork a codesandbox that is similar to your environment (React, etc): https://codesandbox.io/search - For sandboxes that depend on esri-loader see: https://codesandbox.io/search?refinementList[npm_dependencies.dependency][0]=esri-loader diff --git a/CHANGELOG.md b/CHANGELOG.md index aaa3eff..cafce51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,14 +11,14 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [3.7.0] - 2022-11-16 ### Added -- default to JS API 4.25; update docs w/ latest version numbers - @andygup +- default to 4.25; update docs w/ latest version numbers - @andygup ### Changed - raise visibility of deprecation notice for frameworks that do not support async/await at runtime, e.g. Angular due to limitations in Zone.js - archive framework samples and various 3.x-related sections to archived-examples.md. Most of the samples haven't been updated in years ## [3.6.0] - 2022-07-07 ### Added -- default to JSAPI 4.24; update docs w/ latest version numbers - @gavinr +- default to 4.24; update docs w/ latest version numbers - @gavinr ### Changed - fix build by not compiling @types @@ -27,47 +27,47 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [3.5.0] - 2022-03-29 ### Added -- default to JSAPI 4.23; update docs w/ latest version numbers - @gavinr +- default to 4.23; update docs w/ latest version numbers - @gavinr ## [3.4.0] - 2022-01-14 ### Added -- default to JSAPI 4.22; update docs w/ latest version numbers - @gavinr +- default to 4.22; update docs w/ latest version numbers - @gavinr ## [3.3.0] - 2021-09-22 ## [3.2.0] - 2021-07-07 ### Added -- default to JSAPI 4.20; update docs w/ latest version numbers - @gavinr +- default to 4.20; update docs w/ latest version numbers - @gavinr ## [3.1.0] - 2021-04-23 ### Added -- default to JSAPI 4.19; update docs w/ latest version numbers - @vannizhang +- default to 4.19; update docs w/ latest version numbers - @vannizhang ## [3.0.0] - 2020-12-31 ### Added -- default to JSAPI 4.18; update docs w/ latest version numbers - @gavinr +- default to 4.18; update docs w/ latest version numbers - @gavinr ### Breaking -- default version of JSAPI no longer supports IE +- 4.18 no longer supports IE - remove option to set `dojoConfig` - remove esri-loader default export ## [2.16.0] - 2020-10-13 ### Added -- default to JSAPI 4.17; update docs w/ latest version numbers - @tgirgin23 +- default to 4.17; update docs w/ latest version numbers - @tgirgin23 ## [2.15.0] - 2020-07-10 ### Added -- default to JSAPI 4.16; update docs w/ latest version numbers - @JoshCrozier +- default to 4.16; update docs w/ latest version numbers - @JoshCrozier ## [2.14.0] - 2020-04-09 ### Added -- default to JSAPI 4.15; update docs w/ latest version numbers - @JoshCrozier +- default to 4.15; update docs w/ latest version numbers - @JoshCrozier ## [2.13.0] - 2019-12-22 ### Added -- default to JSAPI 4.14; update docs w/ latest version numbers - @gpbmike +- default to 4.14; update docs w/ latest version numbers - @gpbmike ## [2.12.0] - 2019-10-24 @@ -78,8 +78,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2.11.0] - 2019-10-14 ### Added -- default to JSAPI 4.13; update docs w/ latest version numbers -- add support for "next" version of ArcGIS API +- default to 4.13; update docs w/ latest version numbers +- add support for "next" version of ## [2.10.2] - 2019-10-12 @@ -95,7 +95,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2.10.0] - 2019-07-03 ### Added -- default to JSAPI 4.12; update docs w/ latest version numbers +- default to 4.12; update docs w/ latest version numbers ## [2.9.2] - 2019-04-18 @@ -109,7 +109,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2.9.0] - 2019-03-29 ### Added -- default to JSAPI 4.11; update docs w/ latest version numbers +- default to 4.11; update docs w/ latest version numbers ## [2.8.0] - 2019-03-27 ### Added @@ -129,21 +129,21 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [2.6.0] - 2018-12-17 ### Added -- default to JSAPI 4.10; update docs w/ latest version numbers +- default to 4.10; update docs w/ latest version numbers ## [2.5.0] - 2018-09-29 ### Changed -- default to JSAPI 4.9; update docs w/ latest version numbers +- default to 4.9; update docs w/ latest version numbers ## [2.4.0] ### Changed -- default to JSAPI 4.8; update docs w/ latest version numbers +- default to 4.8; update docs w/ latest version numbers ## [2.3.0] ### Added -- default to JSAPI 4.7; update docs w/ latest version numbers +- default to 4.7; update docs w/ latest version numbers ### Changed - added Hyperapp example link to README - move CSS functions into own module @@ -197,7 +197,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [1.6.0] - 2017-12-31 ### Added -- default to version 4.6 of the ArcGIS API [#63](https://github.com/Esri/esri-loader/issues/63) +- default to version 4.6 [#63](https://github.com/Esri/esri-loader/issues/63) ### Changed - remove remaining references to angular-esri-loader from README - update README w/ info on arcgis types and browser support [#60](https://github.com/Esri/esri-loader/issues/60) @@ -251,7 +251,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [1.2.0] ### Added -- default to version 4.5 of the ArcGIS API +- default to 4.5 ### Fixed - don't throw an error when `bootstrap()` is called multiple times w/o a callback @@ -262,7 +262,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [1.1.0] ### Added -- default to version 4.4 of the ArcGIS API +- default to 4.4 ## [1.0.0] @@ -289,13 +289,13 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [0.2.0] ### Added -- enable pre-loading the ArcGIS API -- default to version 4.3 of the ArcGIS API +- enable pre-loading +- default to 4.3 ## [0.1.3] ### Fixed -- default to version 4.2 of the ArcGIS API +- default to 4.2 - use HTTPS by default ## [0.1.2] diff --git a/README.md b/README.md index dfa884d..4df28c2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Travis](https://img.shields.io/travis/Esri/esri-loader.svg)](https://travis-ci.org/Esri/esri-loader/builds/) [![npm](https://img.shields.io/npm/v/esri-loader.svg)](https://github.com/Esri/esri-loader/releases) [![npm](https://img.shields.io/npm/dw/esri-loader.svg)](https://www.npmjs.com/package/esri-loader) [![npm](https://img.shields.io/npm/l/esri-loader.svg)](https://github.com/Esri/esri-loader/blob/master/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/esri/esri-loader.svg?style=social&label=Stars)](https://github.com/Esri/esri-loader/stargazers) -A tiny library to help you use the [ArcGIS API for JavaScript](https://developers.arcgis.com/javascript/latest/tooling-intro/) AMD modules in applications built with popular JavaScript frameworks and bundlers. +A tiny library to help you use the [ArcGIS Maps SDK for JavaScript](https://developers.arcgis.com/javascript/latest/tooling-intro/) AMD modules in applications built with popular JavaScript frameworks and bundlers. **NOTE: It is recommended to try installing [@arcgis/core](https://www.npmjs.com/package/@arcgis/core) and [building with ES Modules](https://developers.arcgis.com/javascript/latest/guide/es-modules) _instead_ of using esri-loader.** Read more below about [when you might want to use esri-loader](#why-is-this-needed). @@ -10,7 +10,7 @@ A tiny library to help you use the [ArcGIS API for JavaScript](https://developer Ready to jump in? Follow the [Install](#install) and [Usage](#usage) instructions below to get started. Then see more in depth instructions on how to [configure esri-loader](#configuring-esri-loader). -Want to learn more? Learn how esri-loader can help [improve application load performance](#lazy-loading-the-arcgis-api-for-javascript) and allow you to [use the ArcGIS API in server side rendered applications](#server-side-rendering). +Want to learn more? Learn how esri-loader can help [improve application load performance](#lazy-loading-the-arcgis-api-for-javascript) and allow you to [use the Maps SDK in server side rendered applications](#server-side-rendering). Looking for legacy examples from a variety of frameworks, or 3.x information? Visit the [archive](archived-examples.md) page. @@ -19,8 +19,8 @@ Looking for legacy examples from a variety of frameworks, or 3.x information? Vi - [Known Limitations](#known-limitations) - [Install](#install) - [Usage](#usage) - - [Loading Modules from the ArcGIS API for JavaScript](#loading-modules-from-the-arcgis-api-for-javascript) - - [Lazy Loading the ArcGIS API for JavaScript](#lazy-loading-the-arcgis-api-for-javascript) + - [Loading Modules from the ArcGIS Maps SDK for JavaScript](#loading-modules-from-the-arcgis-api-for-javascript) + - [Lazy Loading the ArcGIS Maps SDK for JavaScript](#lazy-loading-the-arcgis-api-for-javascript) - [Loading Styles](#loading-styles) - [Do I need esri-loader?](#do-i-need-esri-loader) - [Advanced Usage](#advanced-usage) @@ -29,7 +29,7 @@ Looking for legacy examples from a variety of frameworks, or 3.x information? Vi - [Configuring esri-loader](#configuring-esri-loader) - [Configuring Dojo](#configuring-dojo) - [Overriding ArcGIS Styles](#overriding-arcgis-styles) - - [Pre-loading the ArcGIS API for JavaScript](#pre-loading-the-arcgis-api-for-javascript) + - [Pre-loading the ArcGIS Maps SDK for JavaScript](#pre-loading-the-arcgis-api-for-javascript) - [Using your own script tag](#using-your-own-script-tag) - [Without a module bundler](#without-a-module-bundler) - [Using a module script tag](#using-a-module-script-tag) @@ -50,7 +50,7 @@ Looking for legacy examples from a variety of frameworks, or 3.x information? Vi ## Known Limitations -- Compatibility with implementations that don't support [async/await](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Promises#async_and_await) at runtime, within AMD modules, is deprecated at version 4.25 (November 2022) - this means the functionality will be removed in a future release. In particular, this affects Angular applications using esri-loader because of [well-known limitations in Zone.js](https://angular.io/guide/roadmap#improve-runtime-performance-and-make-zonejs-optional). Angular users will need to migrate from AMD modules to using [@arcgis/core ES modules](https://developers.arcgis.com/javascript/latest/es-modules/) in order to continue using the latest release of the API. Refer to the [APIs FAQ](https://developers.arcgis.com/javascript/latest/faq/#how-are-breaking-changes-managed) for more information on breaking changes. +- Compatibility with implementations that don't support [async/await](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Promises#async_and_await) at runtime, within AMD modules, is deprecated at version 4.25 (November 2022) - this means the functionality will be removed in a future release. In particular, this affects Angular applications using esri-loader because of [well-known limitations in Zone.js](https://angular.io/guide/roadmap#improve-runtime-performance-and-make-zonejs-optional). Angular users will need to migrate from AMD modules to using [@arcgis/core ES modules](https://developers.arcgis.com/javascript/latest/es-modules/) in order to continue using the latest release of the SDK. Refer to the [FAQ](https://developers.arcgis.com/javascript/latest/faq/#how-are-breaking-changes-managed) for more information on breaking changes. ## Install @@ -66,9 +66,9 @@ yarn add esri-loader ## Usage -The code snippets below show how to load the ArcGIS API and its modules and then use them to create a map. Where you would place similar code in your application will depend on which application framework you are using. +The code snippets below show how to load the ArcGIS Maps SDK for JavaScript and its modules and then use them to create a map. Where you would place similar code in your application will depend on which application framework you are using. -### Loading Modules from the ArcGIS API for JavaScript +### Loading Modules from the ArcGIS Maps SDK for JavaScript #### From the Latest Version @@ -77,7 +77,7 @@ Here's an example of how you could load and use the `WebMap` and `MapView` class ```js import { loadModules } from 'esri-loader'; -// this will lazy load the ArcGIS API +// this will lazy load the SDK // and then use Dojo's loader to require the classes loadModules(['esri/views/MapView', 'esri/WebMap']) .then(([MapView, WebMap]) => { @@ -101,7 +101,7 @@ loadModules(['esri/views/MapView', 'esri/WebMap']) #### From a Specific Version -By default esri-loader will load modules from the [latest 4.x release of the API from the CDN](https://developers.arcgis.com/javascript/latest/guide/get-api/#cdn), but you can [configure the default behavior](#configuring-esri-loader) by calling `setDefaultOptions()` once _before_ making any calls to `loadModules()`. +By default esri-loader will load modules from the [latest 4.x release of the SDK from the CDN](https://developers.arcgis.com/javascript/latest/guide/get-api/#cdn), but you can [configure the default behavior](#configuring-esri-loader) by calling `setDefaultOptions()` once _before_ making any calls to `loadModules()`. ```js // app.js @@ -118,7 +118,7 @@ Then later, for example after a map component has mounted, you would use `loadMo // component.js import { loadModules } from 'esri-loader'; -// this will lazy load the ArcGIS API +// this will lazy load the SDK // and then use Dojo's loader to require the map class loadModules(['esri/map']) .then(([Map]) => { @@ -135,7 +135,7 @@ loadModules(['esri/map']) }); ``` -You can load the ["next" version of the ArcGIS API](https://github.com/Esri/feedback-js-api-next#esri-loader) by passing `version: 'next'`. +You can load the ["next" version of the SDK](https://github.com/Esri/feedback-js-api-next#esri-loader) by passing `version: 'next'`. #### From a Specific URL @@ -145,22 +145,22 @@ If you want to load modules from a build that you host on your own server (i.e. // app.js import { setDefaultOptions } from 'esri-loader'; -// configure esri-loader to use version from a locally hosted build of the API +// configure esri-loader to use version from a locally hosted build of the SDK // NOTE: make sure this is called once before any calls to loadModules() setDefaultOptions({ url: `http://server/path/to/esri` }); ``` See [Configuring esri-loader](#configuring-esri-loader) for all available configuration options. -### Lazy Loading the ArcGIS API for JavaScript +### Lazy Loading -Lazy loading the ArcGIS API can dramatically improve the initial load performance of your mapping application, especially if your users may never end up visiting any routes that need to show a map or 3D scene. That is why it is the default behavior of esri-loader. In the above snippets, the first time `loadModules()` is called, it will lazy load the ArcGIS API by injecting a `