← Back to Blog

Stop paying per tile: basemap sessions on ArcGIS Location Platform

A session pass covering a grid of map tiles — the basemap session usage model on ArcGIS Location Platform

By default, every basemap tile your ArcGIS Location Platform app requests is a line on your bill. Every pan, every zoom, every basemap switch pulls more tiles — which makes the one thing your best users do most (explore the map) the one thing you can’t predict the cost of. The session usage model flips that: one billed session buys a single user unlimited basemap tiles for up to 12 hours. And since ArcGIS Maps SDK for JavaScript 5.0, turning it on is one config block.

This post walks through both basemap usage models on the Basemap Styles service, the billing mechanics that aren’t obvious until you read the fine print, the decision criteria we use when we architect an app, and the implementation in both the ArcGIS Maps SDK for JavaScript and MapLibre GL JS.

Scope check: basemap sessions are a feature of ArcGIS Location Platform — the pay-as-you-go developer offering. Esri’s documentation flags the usage-model guide as Location Platform–specific, and the JS Maps SDK release notes state the session API is “only supported for Location Platform.” If your app authenticates against an ArcGIS Online organization’s basemaps, this dial isn’t available to you.

The two usage models

The ArcGIS Basemap Styles service supports two application programming patterns, and the one you implement determines what you’re billed for:

 Tile usage modelSession usage model
Billed unitEach basemap tile returnedEach session created
Cost shapeScales with user interaction — open-endedFlat per user per session — capped
TokenAccess token (API key) on every requestShort-lived session token from /sessions/start
Max lifetimen/a12 hours per session
Style accessAll styles in the serviceOnly the style family the session was created for (arcgis or open)
Best forPrototypes; focused, low-interaction mapsInteractive, long-running, high-tile-volume apps

The tile model is what you get implicitly when you drop an API key into a map: the style request returns tiles, and usage accrues for every tile consumed — on initial load, on style change, and on every pan and zoom. Esri’s own guidance for keeping tile costs sane is telling: start the map at a focused extent, cap minZoom/maxZoom, constrain maxBounds, and disable rotation and pitch. In other words: spend less by letting users do less. That’s fine for a store locator. It’s exactly wrong for the premium, exploratory apps we build — where map interaction is the product.

How a basemap session works

A basemap session is a time window during which a single user of a single application uses a session token to pull unlimited basemap tiles. The mechanics, per the basemap usage documentation:

  1. Your app authenticates with a normal access token (API key credential) carrying the premium:user:basemaps privilege.
  2. It calls the Basemap Styles service /sessions/start endpoint, declaring a styleFamily (arcgis or open) and a duration — up to 43,200 seconds (12 hours).
  3. The service returns a session token. From here on, every style and tile request uses that token instead of the API key.
  4. When the session expires, the app starts a new session and swaps the token. One user, one app run, one (or a few) billed sessions — no matter how many thousands of tiles they consumed.

The session token is deliberately narrow: it can only reach the Basemap Styles service it was created from, and only styles in the family it was created for. It is not a general-purpose credential — geocoding, routing, and data services still use your regular access token. That separation is good security hygiene for free: the token you expose most often is the one that can do the least.

The billing fine print worth knowing

Three details from the Location Platform billing documentation that change how you design:

Enabling sessions in the ArcGIS Maps SDK for JavaScript

Before 5.0 you had to manage the /sessions/start handshake and token swap yourself. As of version 5.0 (February 2026) the SDK ships a first-class config.sessions API that does it all — including automatic token refresh at the end of each session:

import esriConfig from "@arcgis/core/config.js";

esriConfig.apiKey = import.meta.env.VITE_ARCGIS_API_KEY; // never hard-code it

esriConfig.sessions = {
  basemap: {
    enabled: true,
    styleFamily: "arcgis", // session can only access "arcgis" styles
    autoRefresh: true,     // new session token at end of duration
    duration: 43200,        // seconds — 12 hours, the maximum
  },
};

That’s the entire integration. The SDK starts the session, routes basemap style and tile requests through the session token, keeps your API key for everything else, and — with autoRefresh — rolls the session over when it expires. Esri’s Display a map with a basemap session tutorial walks the same setup end-to-end.

Doing it by hand in MapLibre GL JS

On the open-source side there’s no config flag, but the REST handshake is small. Start the session against /sessions/start, then build style URLs with the returned session token:

const createBasemapSession = async (accessToken) => {
  const res = await fetch(
    "https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start?" +
    new URLSearchParams({ styleFamily: "arcgis", durationSeconds: 43200 }),
    { headers: { Authorization: `Bearer ${accessToken}` } }
  );
  return res.json(); // { sessionToken, endTime, ... }
};

const session = await createBasemapSession(accessToken);
const map = new maplibregl.Map({
  container: "map",
  style: `https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/styles/arcgis/navigation?token=${session.sessionToken}`,
});

Track endTime yourself and start a fresh session when it passes. One trap from the docs: the map may cache the original token inside style resources — on refresh you may need to replace the style entirely (map.setStyle(...) with the new token), not just the token string.

Which model should your app use?

Our rule of thumb when we scope a Location Platform app:

The buyer’s-eye view: the session model turns basemap spend from a variable cost that punishes engagement into a fixed cost per active user — the same shape as the rest of your per-seat economics. If you’re pricing a commercial map product on Location Platform, that predictability is worth as much as the savings. Check the current per-session and per-tile rates on the Location Platform pricing page and run both models against your expected usage before committing.

References

Not sure what your basemap usage will cost at scale?

We architect ArcGIS Location Platform apps with the usage model, token strategy, and cost controls decided up front — so the bill at 1,000 users looks like the estimate at 10.

Book a free intro call