Using OS styles to get started in Mapbox Studio
Last updated
Last updated
OS has supplied Mapbox GL Styles created by our cartographic designers for use in Mapbox Studio on GitHub. These stylesheets allow you to add colours to features contained in the vector tiles to produce a far more vivid and visually appealing map.
The following step-by-step instructions will guide you through setting up Mapbox GL Styles in Mapbox Studio:
Download the appropriate repositories from GitHub. The example screenshot below shows a screenshot of the GitHub repository containing OS Open Zoomstack stylesheets. This downloaded repository should be stored in an appropriate location.
Navigate to Mapbox Studio to complete the next set of instructions.
Copy the Map ID for your new tileset by doing the following:
In Mapbox Studio, click on the Tilesets tab in the top right corner.
Scroll down until you see your new tileset and click the Menu button.
Click on the clipboard icon to copy the Map ID.
Open the folder of stylesheets that you downloaded in step 1 and navigate to Vector Tiles > Mapbox GL Styles, where you will find four styles (Road, Outdoor, Light, and Night).
Choose the style that you want to use, then open the .json file (for example, Outdoor.json) in a text editor.
Find the following block of code near the top of the file (line 46) and paste your Map ID where it says ADD-SOURCEURL-HERE:
Save the .json file.
Go back to Mapbox Studio and click the Styles tab.
Click the Upload button.
Navigate to your newly saved style.json file and click Open.
The style will then load up in the Mapbox Studio style editor.
From this point on, you can customise the content and style of your map (for example, you can turn layers on or off, delete layers from your map, add new layers, and change any of the style elements).
Once you are happy with your map, click Publish in the top right corner and your map is ready to use.