Blank or missing map tiles
Maps can fail to load for a variety of reasons related to your Mapbox account, your code, the browser you are using, the network you are on, or your computer.
This guide explains how to troubleshoot some common reasons maps fail to load.
Your style ID is invalid
If you are using a Mapbox Studio style, check to make sure the style URL you are using contains a valid style ID.
Style ID
You can test the style ID by finding the style URL you've added to your code, copying the string after the last /
, and navigating to the following URL in your web browser (be sure to replace username
with your own and use the string you copied from your style URL to replace the style_id
):
https://api.mapbox.com/styles/v1/{username}/{style_id}?access_token=YOUR_MAPBOX_ACCESS_TOKEN
If a JSON object is not returned, your style ID is invalid. You can find valid style URLs on your Styles page. You may also use any of the Mapbox styles.
Tileset ID
You can test the tileset ID by finding the tileset ID you've added to your code and navigating to the following URL in your web browser (be sure to replace the {tileset_id}
with your own):
https://api.mapbox.com/v4/{tileset_id}/page.html?access_token=YOUR_MAPBOX_ACCESS_TOKEN
If this page doesn't load, your tileset ID is invalid. You can find valid tileset IDs on your Tilesets page.