Source limits in Mapbox Studio styles
You can check the number of sources used in your style in the Mapbox Studio style editor. Open the style in the style editor, click on the Settings option in the top toolbar, and scroll to the Layer overview section.
There are several strategies you can use to reduce the number of sources you're using in your style.
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 them 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 them all at once to Mapbox. Learn more about creating sources with multiple data layers in the Mapbox Studio Classic Manual.
Once you've combined sources, there are a few different ways to style the data in the Mapbox Studio style editor:
- Data-driven styling: You can use the style editor to assign styles based on your data's properties. Learn more about creating data-driven styles 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.
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 whether source compositing is on, open your style in the style editor, click on the Settings option in the top toolbar, and scroll to the Source compositing section.