Static Tiles API
The Mapbox Static Tiles API serves raster tiles generated from a Mapbox GL-based style. The Static Tiles API is typically used to request a series of tiles to make a Mapbox.js, Leaflet, or other raster-based slippy map.
A sample Static Tiles API request looks like:
https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/1/1/0?access_token=YOUR_MAPBOX_ACCESS_TOKEN
The Static Tiles API has optional parameters that can be used to refine the results of a request.
If you are using a Mapbox GL map style (using a style URL) via L.mapbox.styleLayer
, you are requesting map tiles from the Static Tiles API, which takes GL-based styles and renders raster tiles. The example below uses a GL-based style, mapbox://styles/mapbox/streets-v12
, with Mapbox.js.
L.map('map')
.setView([38.8929, -77.0252], 14)
.addLayer(L.mapbox.styleLayer('mapbox://styles/mapbox/streets-v12'));
Related resources: