leafletmapboxmapbox-studio

Mapbox Outdoors - Background and Labels of Old Style with Mapbox Studio


I've been working with a leaflet map using the mapbox outdoors raster tile server. Mapbox has a handful of ready-made styles, most of which are listed in this answer. The code / url for this is like so:

var mapBoxOutdoorsClassic = L.tileLayer('https://api.tiles.mapbox.com/v4/mapbox.outdoors/{z}/{x}/{y}.png?access_token={accessToken}', {
  accessToken: '...',
  attribution: '...',
  maxZoom: 18,
  }).addTo(map1);

I love this style. But my issue is that I'm trying to add an imageoverly. I want the imageoverlay to be above the map terrain graphics, but under the labels. So what I did was go into mapbox studio and create these two styles - basically the outdoors style, with the labels separated out:

Without Labels

Labels Only

Here's a codesandbox comparing the raster and mapbox studio styles

The old style is on the left, the new styles with the separated out layers is on the right. You can play with the layers in the upper right corner.

So separating the layers out has worked well, as you can see in the codesandbox. But the styles from the raster tiles are not really the same as the ones from mapbox studio! I'm guessing the raster tiles are from a few years ago, and the styles have been updated since. But I really like the older style - it has more of a colored pencil feel to it, more of a national parks map style, as opposed to the new style which has more of an OSM or google maps feel. Rather than spend hours in mapbox studio trying to recreate the old style, does anyone know if these styles exist somewhere within mapbox studio? Perhaps a 'mapbox outdoors classic'? I really just want the exact styles are show in the map on the left in my codesandbox, but with the ability to separate the labels layer from the rest.


Solution

  • With Mapbox Studio style components, it's actually pretty quick to recreate older Mapbox styles in the modern Mapbox Studio. In fact, here's a five minute video from Mapbox showing how to recreate the classic Mapbox Outdoors in modern Studio!

    How to update a classic style in modern Mapbox Studio