How to style a choropleth map in the Customize
Map design Advanced cartography examples
This set of articles represents a recommended selection of advanced cartography examples.
- How to make custom map design in MapTiler Cloud
- How to style a retro map
- How to style a pop art map
- Map styled like a picture
- How to make an Oktoberfest map
- How to style a choropleth map in the Customize
- How to use MapTiler Ocean
MapTiler Countries dataset makes it easy to build a choropleth map where you connect geographically related data to countries, administrative or postal units, e.g. election maps, census data, and other statistical data. Read more about Countries if you need general information or see schema documentation.
There are two ways how to do it:
- For simple use cases, we recommend using our Customize. The tool is part of your account in MapTiler Cloud. This article is about this method.
- For a more complex analysis of tabular data, you should join them with the dataset using the JavaScript library. How to do it in MapLibre is described in this article.
Prepare MapTiler Countries for the Customize
1. Finding the Countries tileset
MapTiler Countries is available in MapTiler Cloud in the Tiles section.
2. Creating a style from scratch
To be able to visually edit this tileset, we need to create a style. It can be done by clicking on Create Style button located under the tileset preview.
3. Filling the name and description
After clicking on Create Style we will be shown a form where we can fill in the Title, Label, and Description of the new map. In this case, the title is Countries Satellite, the label is set to test, and the description is Satellite background with Countries tileset.
4. Entering into Customize
When a new map style is created, you can see that title, label, and description are successfully created as a new map Countries Satellite.To enter into Customize, click on Customize button.
5. Deleting unused layers
- Click on the Layers (Alt + L) button on the left panel
- Right Click on postal_polygon
- Click on Delete
- Delete also postal_point, postal_line, and administration_point
6. Filtering France and Portugal country
- Select administrative_polygon layer
- Switch to the Data view
- Set up a filter for iso_a2 on FR and PT
- Set up a filter for level 0
7. Coloring the filtered countries
Set the color of administrative_polygon on #2F38B1 (in Style view)
8. Duplicating the layer
- To create a supplement country with different colors, we need to duplicate the style layer and filter out France and Portugal
- Right-click on administrative_polygon
- Click on Duplicate
- Set the name of the duplicated layer on Europe (right-click on the layer and select Rename)
- Filter out the France and Portugal countries by setting up iso_a2 and continent values.
9. Setting color for the Europe layer
Set the color of Europe layer on #468B5C (in Style view)
10. Filter out just the lines for the states (provinces)
- Keep just the borders for provinces setting up the filter for administrative_line
- Set filter as level = 1
11. Setting color for the administrative_line layer
Set the color of administrative_line layer on #80817E (in Style view)
12. Moving the layer on the top
Move the administrative_line layer on the top of the list to see the layer on the top of all features (Verticality tab)
13. Adding background satellite
- For a better context, we can add satellite images as a background
- Click on Data Sources (Alt + D) button on the left panel
- Click on `+` sign (Alt + N)
14. Selecting the Satellite tileset source
15. Adding a new layer
- Click on the Layers (Alt + L) button on the left panel
- Click on `+` sign (Alt + N)
- Select Layer
- Select the Satellite Mediumres 2018
- Keep the data format as Raster
- Add the name of the layer. In this case as satellite 2018
- Move the satellite 2018 down in the list in the Verticality tab
16. Setting up the default view of the map
- Under Settings (Alt + S) button at the left panel
- Click on Set current view button
- Click on Save
17. Publishing the map
Click on Publish
18. Confirmation of the publishing
19. Close the Customize and use the link to share or implement it into your websites
Insert the map in a website
After saving and publishing this map in your account, you can add it to your web page. All needed info is available in the MapTiler Cloud account on the page with your map. Read how to insert maps in websites with a simple iframe.
Next steps
Continue to How to use MapTiler Ocean to learn how to leverage the MapTiler Ocean map style to the hilt!
Useful links
MapTiler Countries dataset
MapTiler Countries
MapTiler Countries schema
Join MapTiler Countries with your own custom data and make a choropleth map
Related guides
- Add a new style layer
- Add custom watermark to your map
- Change language in a map
- Choose a map style
- Contours and mountain peaks in feet
- Creating a custom vector dataset (GeoJSON)
- Data sources
- Disputed borders on your maps
- Edit style: Quick customization of the map (Roads and traffic)
- Editing JSON