This article explains how layer filters in MapTiler Customize work. With layer filters, the user can select data 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.
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.
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).
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.