Skip to main content

Add a hillshade layer

  • This is a modified version of the Monochrome template style.

  • This example adds a new hillshade layer named mapbox-mapbox-terrain-dem-v1.

About this style

  • Hillshade layer data: The data for the hillshade layer comes from the mapbox.mapbox-terrain-dem-v1 tileset. Mapbox Terrain-DEM tileset is a raster-dem source that contains global elevation data encoded in raster PNG tiles as color values. Because it uses a raster-dem source to calculate the slope and shadow pixel-by-pixel on the user’s computer, the resulting hillshading is much more detailed than the shading that’s possible with a vector-terrain tileset. It’s the difference between styling individual pixels vs. broader, less detailed polygons. Read more about the Mapbox Terrain-DEM tileset.

  • Layers tab: This example uses a custom layer added and styled in the Layers tab.

  • Raster tile styling: With hillshade layers, you can customize the color, illumination direction, and intensity of the hillshading effect. Open this style in the style editor to experiment with hillshade style properties. Read more about the hillshade layer type in the Mapbox Style Specification.

Looking for more guidance? Read our tutorials.

Was this example helpful?