This article will help you highlight a specific country's national boundary. Any map style that uses the MapTiler Planet tileset could use attributes included in the `boundary` layer. New attributes for highlighting national boundaries were announced in OpenMapTiles v3.12.
In attributes (in step 6) you can use the ISO A3 values of the country (e.g. CHE, FRA, CZE, ...). You can also find the required value in the Inspect mode (top right corner - change from Map to Inspect).
Highlight a national boundary step-by-step:
Click the button Customize a copy.
Duplicate the Country border layer, and rename it "Switzerland," move it below Country border layer.
Switch to the Data view (bottom left) and add 2 new filters by clicking the plus sign.
The 1st filter is "adm0_l == CHE"; the filter logic is set to "Any", only the "CHE" value applies.
The 2nd filter is "adm0_r == CHE"; the filter logic is set to "Any", only the "CHE" value applies.
Set the zoom range styling settings accordingly: 1-1px, 5-3px, 10-5px.
Publish your map by clicking the blue button Publish (top right). You will see the before/after screen.
Conclusion
After publishing your map, you can use it in your application or on your web. The links for vector tiles, raster tiles, static maps, WMTS, or any of the major publishing libraries are listed below the map preview window.
Useful links
How to highlight a specific country on your map
MapTiler map design section
MapTiler Planet Schema
Comments
0 comments
Please sign in to leave a comment.