Styles made with the Mapbox Studio style editor or uploaded to your Mapbox account have a limit of 15 sources. If you try to add more than 15 sources to your style, you will receive the error message
Failed to update style.
Check number of sources used
You can check the number of sources used in your style using the Style reference option in the Mapbox Studio style editor. Open the style in the Mapbox Studio style editor, and click on the Style reference option in the toolbar in the upper right.
Reduce the number of sources
There are several strategies you can use to reduce the number of sources you’re using in your style.
Combine sources outside Mapbox Studio
The most effective way to reduce the number of sources you’re using in a style is to combine data from multiple data files or tilesets into a single tileset. You can do this in several ways:
- GIS application: Use a tool outside of Mapbox, such as QGIS or ArcGIS, to merge your geospatial data before you upload it to Mapbox.
- Tippecanoe: Use our open source command line tool, Tippecanoe, to add multiple data files to a single tileset source, export to MBTiles, and upload all at once to Mapbox.
- Mapbox Studio Classic: Use our legacy desktop tool Mapbox Studio Classic to add multiple data files to a single tileset source, export to MBTiles, and upload all at once to Mapbox. Learn more about creating sources with multiple data layers in the Mapbox Studio Classic Manual.
Style combined sources
Once you’ve combined sources, there are a couple ways to style the data in the style editor:
- Data-driven styling: Use property functions to style your data based on a data field. Learn more about property functions in the Mapbox Studio Manual styles section and our Make a choropleth map tutorial series.
- Filtering: As long as your data has properties that uniquely identify each of the original datasets, you can also use Mapbox Studio’s filter functionality to create distinct style layers from a single tileset source. Learn more about filtering in the Mapbox Studio Manual styles section.
Make sure source compositing is on
Sources used in a Mapbox Studio style are composited, or combined, by default. Source compositing does not reduce the number of sources counted toward this limit, but if source compositing is on, tileset sources that are not being used in any style layers will automatically be removed from the composite source. To check if source compositing is on, open your style in the style editor, click Debug on the right side, look for the Source compositing section.