How to create a land polygon with a drop shadow effect
A land polygon tileset is available in the Standard Tiles section of your MapTiler Cloud account. This article shows how to style land features with a drop-shadow effect. The land polygon tileset can be accessed from MapTiler Cloud Tiles.
-
Open any map style in the MapTiler Cloud maps section.
-
Hide all blocks except Water and Background (click the little eye icon).
-
Add a new layer (“plus” sign top-left).
-
Add the data source called Land (geometry polygon, layer name Land).
-
Change the color of the Land layer to HSL (49, 47, 91).
-
Open the Water block and the Water layer.
-
Change the color of the Water layer to HSL (49, 47, 91).
-
Duplicate the layer Land.
-
Rename the new layer to Land_polygon_shadow.
-
Change the color of the Land_polygon_shadow layer to HSL (203, 65, 40).
-
For Land_polygon_shadow adjust the layer opacity to 50% at ZL14.
-
For Land_polygon_shadow adjust the Fill settings.
Open Advanced fill properties, click Layout, click Translate and enable Zoom range styling. Use the following values:
- ZL2 (1px, 1px)
- ZL6 (1.5px, 1.5px)
- ZL11 (2px, 2px)
- ZL14 (2.2px, 2.2px)
- ZL17 (1.6px, 1.6px)
- ZL18 (1px, 1px).
-
To achieve the final result, you have to re-arrange the order of layers.
-
Click Verticality (bottom-left).
-
Move the layer Land_polygon_shadow under the layer Land.
Congratulations, you have successfully created the drop shadow effect!
Bonus tip: You can view the JSON code by clicking the {} icon at the bottom left.
-
Save and publish your new map by clicking the top-right Save and Publish buttons. The final result will look like this (see above) in the detail of your map styles library preview.
Useful links
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)