Skip to main content

Mapbox GL JS Usage Playground

Mapbox GL JS usage is billed by the number of map loads that occur per month. A map load is counted when the Map instance is initialized, and is not affected by additional tile requests as users interact with the map.

Earlier versions were billed based on tile requests, which would increase as the user pans and zooms the map.

Interact with the map below to understand these two different usage units. You can also turn on an additional layer with a separate vector tile source to see how Mapbox GL JS requests tiles for sources added after the map is loaded.

Map loads

Mapbox GL JS v1.0.0+

A map load occurs whenever a Mapbox GL JS Map object is initialized. Additional user interactions, such as panning and zooming, do not incur additional map loads. This means that people who are using your web map can toggle additional sources on and off, interact with the map, and toggle between styles without affecting your usage.

The maximum session length for a map load is 12 hours, meaning a user can have a browser open with continuous map interactions that all count towards the same map load during a consecutive 12 hour window. After 12 hours of continuous map interactions, a new map load is triggered.

Vector Tiles API requests

Mapbox GL JS < v1.0.0

As the user pans and zooms the map, Mapbox GL JS requests the necessary vector tiles for the area being viewed and prepares the data for rendering. The tiles are served by the Mapbox Vector Tiles API. Each API request returns a single tile from a vector tileset.

Updating from v1.x.x to v2.x.x

The action that triggers a map load changed in Mapbox GL JS v2.0.0. Before updating an existing implementation from v1.x.x to v2.x.x, please review our pricing documentation to estimate expected costs.

Was this playground helpful?