Layer filters
Map design basics
This collection of articles forms a suggested workflow to understanding the fundamentals of map design basic.
- Layer styling
- Style by the zoom range
- Add a new style layer
- Layer filters
This article explains how layer filters in MapTiler Customize work. With layer filters, the user can selectdata in the map based on various data attributes. Thanks to MapTiler Customize, you do not need to have deep knowledge about the datasets as the tool shows all the data information on UI.
To use MapTiler Customize, you need to set up a MapTiler Cloud account. If you don’t have one yet, don’t hesitate to sign up for free!
Source selection, layer, geometry
To work with layer filters, click on a specific layer and go to the Data tab. By clicking on a “plus” button, you will see what attributes you can filter out in your map.
Apart from filters, you can choose your preferred Data source, Data layer, or Geometry.
Inspect mode
When switched to the Data tab, you can inspect the map on the right side, click on it and discover what attributes are stored in the data.
This is similar to Inspect mode in the Maputnik editor. The attribute values can be copied with a click and then used in the filters.
You can also inspect your data in the Data sources panel (Alt+D) and check what Layers you use a specific data source in.
Attributes - How to filter by class
Every layer has a specific set of attributes. The most common for MapTiler data is a class(used for classification or hierarchy of map features). A list of classes is available after adding a new Filter > Filter by attribute: class.
For example, water can have various classes, such as lakes, oceans, or rivers.
The filter format can also be switched from Visual to Native, which is similar to the JSON code.
With filters UI, you can either select all values, multiple values, or one specific value.
Many other attributes apart from class can be filtered. It depends on what data and layer you are adjusting. The list of attributes is always visible once you click on the “plus” button to add a new filter. Some examples include subclass, name (mostly for labels), oneway, tunnel, toll or ramp for transport etc.
Other values of attributes
Attributes always have a “No value” option. This is to ensure that you can select data without any attribute value filled in. If you would like to omit this (recommended mostly for labels), unselect the No value option.
Some filters can also have an “All values” option. This option appears for unique values which would not fit into a list (such as capital city names).
Conclusion
MapTiler Customize allows users to filter any data attributes. You get a list of possible values on UI or you can inspect the map and copy the values from there.
Next steps
Continue to Working with Icons to learn how use a set of icons for displaying points of interest, highway shields, peaks, etc.
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
- Download datasets in GeoJSON for desktop GIS
- Edit style: Quick customization of the map (Roads and traffic)