Skip to content

Helpers for starting and managing basemap sessions in ArcGIS REST JS.

Node.js

To use ArcGIS REST JS in a backend or Node.js application, first install the package using your preferred package manager, such as NPM or Yarn.

Use dark colors for code blocksCopy
1
npm install @esri/arcgis-rest-basemap-sessions

Once installed, you can import or require modules depending on your Node setup.

ES modules

Use dark colors for code blocksCopy
1
import { BasemapStyleSession } from "@esri/arcgis-rest-basemap-sessions"

CommonJS

Use dark colors for code blocksCopy
1
const BasemapStyleSession = require("@esri/arcgis-rest-basemap-sessions");

CDN

You can load ArcGIS REST JS directly in the browser using CDN with a global object or with an import map.

Global object

Use dark colors for code blocksCopy
1
2
3
4
5
6
<script src="https://unpkg.com/@esri/arcgis-rest-basemap-sessions@1.1.0/dist/bundled/basemap-sessions.umd.min.js"
  integrity="sha512-k3vhhp0N0UQIdwMsd6pxMQBLD2g6864TGCJHnBen0mjjT5Xxll2Ef+d7S0J8rua+fKBAfNOGpMEf0HJLlG7ENQ==">
</script>
<script>
  import { BasemapStyleSession } from "@esri/arcgis-rest-basemap-sessions";
</script>

Import map

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
<script type="importmap">
{
  "imports": {
    "@esri/arcgis-rest-basemap-sessions": "https://esm.run/@esri/arcgis-rest-basemap-sessions@1.1.0"
  }
}
</script>
<script type="module">
  import { BasemapStyleSession } from "@esri/arcgis-rest-basemap-sessions";
</script>

Exports

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.