Reputation: 321
This question is about Mapbox Studio. My use case is showing a map of tax treaties between various countries where some very small countries are important due to being tax havens, for example Mauritius. The label for the island of Mauritius is only displayed at map zoom level 2 or higher whereas it would be useful to show this label at the same prominence as other larger countries. Are the labels baked into the Mapbox tiles or is there a way of controlling when they appear?
I've discovered that you can further filter which countries are shown, but not control this initial setting of which zoom level they appear at.
Upvotes: 2
Views: 2958
Reputation: 529
You can customize this by ejecting the component that the label belongs to. Then, by selecting the layer and navigating to the "Select data" tab, you can then customize the "zoom extend" and "filters", which control this.
Upvotes: 0
Reputation: 1299
Most times, when wanting to change the styling of a particular label, the best approach would be to follow this guide on customizing label text for a single label. However, as you mentioned, the island of Mauritius is only displayed at map zoom level 2. We can determine that this is a limitation of how the source data is being included in the Mapbox Streets tileset by following the steps outlined below. Sometimes, data does not appear in a map style because of the way it is styled (i.e. how the properties are specified for the relevant layer), whereas other times it does not appear because it is simply not included in the underlying tileset at that particular zoom level. Tilesets conditionally include data at different zoom levels for performance enhancements.
country-label
symbol layer).Select data
tab. This view allows you to see which labels are visible at a particular zoom level.Mauritius
is not present at z1.99
but is at z2
.Fortunately, much of the data behind Mapbox Streets comes from OpenStreetMap and you can download the data you need using a number of different methods, to then be included in your map style:
z2
.If there are only a few country labels that you'd like to add, it might be easier to manually create a GeoJSON file with the labels and coordinates, and then tile this data with the Tilesets API, rather than downloading the data with Overpass Turbo.
Upvotes: 5