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.
npm install @esri/arcgis-rest-basemap-sessionsOnce installed, you can import or require modules depending on your Node setup.
ES modules
import { BasemapStyleSession } from "@esri/arcgis-rest-basemap-sessions"CommonJS
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
<script src="https://unpkg.com/@esri/arcgis-rest-basemap-sessions@4.8.0/dist/bundled/basemap-sessions.umd.min.js"
integrity="sha512-ESRXNhNC8DbuGz48FW/xFnI/Lbax0J+HuHNb+7TW1A8uufMngeYccr9KwefevO+JOZQb0GB6DYWE4/BNTB+zwA==">
</script>
<script>
import { BasemapStyleSession } from "@esri/arcgis-rest-basemap-sessions";
</script>Import map
<script type="importmap">
{
"imports": {
"@esri/arcgis-rest-basemap-sessions": "https://esm.run/@esri/arcgis-rest-basemap-sessions@4.8.0"
}
}
</script>
<script type="module">
import { BasemapStyleSession } from "@esri/arcgis-rest-basemap-sessions";
</script>