Part 1: Creating styles with Mapbox
- Create an account with Mapbox if you don't already have one.
- Go to Styles and create a new style. When picking a template style, start with Bright.
- Edit the style. Start with the parks layer (Landuse > landuse_park) and change the color and stroke of parks. Zoom into a city to see your handywork.
- Make the colors of the parks layer change by zoom level.
- Next look at streets (Roads > road_street). What is the relationship between road_street and road_street_casing?
- Next look at buildings (Buildings > building and Buildings > building_top. What does building_top do?
Part 2: Using Mapbox styles in Carto
- Publish your style from Part 1.
- Click the Preview, develop, and use button once you publish it.
- From this page you will need the Access token from the Develop with this style section and the Integration URL from under Use style in GIS apps > CartoDB.
- Open a Carto map.
- Click on the base map (the bottom layer).
- Under Source scroll over to and click Mapbox, then click the + under Style.
- Copy your Access token into Enter your access token and Integration URL into Enter your map id/url.
- Click Add basemap and your basemap from Mapbox should appear.
Part 3: Adding your own data to Carto
- Select the rivers layer (Water > waterway_river) and click the Select data tab.
- At what zoom level do rivers become available?
- Let's say we want to make rivers visible when zoomed out more. Download Natural Earth's rivers data and go to Tilesets in your Mapbox account and upload the zip file you downloaded. This will take a minute or two to upload and process.
- Go back to editing your style.
- Click New layer, then click the button next to Source. Find and click on the rivers under Unused sources. The name should start with ne_10m....
- Set the Zoom max so that this layer does not overlap with the other rivers layer.
- Add a filter to only select features with scalerank less than 5—we only want to show the more prominent rivers.
- Click Create layer and style it.