Layer filters

Map design basics

This collection of articles forms a suggested workflow to understanding the fundamentals of map design basic.

  1. Layer styling
  2. Style by the zoom range
  3. Add a new style layer
  4. 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.

filter-attributes.png

Apart from filters, you can choose your preferred Data source, Data layer, or Geometry. 

data-panel.png

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. 

filter-inspect.png

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.

data-sources.png

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.

filter-class-add.png

For example, water can have various classes, such as lakes, oceans, or rivers.

filter-class-water.png

The filter format can also be switched from Visual to Native, which is similar to the JSON code.

filter-native.png

With filters UI, you can either select all values, multiple values, or one specific value.

filter-select-one.png

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.

filter-no-value.png

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).

filter-all-values.png

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.