Skip to content
Make with

Terrarium Elevation

by AWS Open DataFree, no API key

Global elevation tiles in Terrarium format. Use for hillshading and 3D terrain in MapLibre.

const elevation = {
  type: "raster-dem",
  tiles: ["https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png"],
  tileSize: 256,
  encoding: "terrarium",
};

const map = new maplibregl.Map({
  container: "map",
  style: {
    version: 8,
    sources: {
      terrain: elevation,
      hillshade: elevation,
    },
    layers: [
      { id: "background", type: "background", paint: { "background-color": "#e9e5dc" } },
      { id: "hillshade", type: "hillshade", source: "hillshade" },
    ],
    // Enable 3D terrain from the elevation source
    terrain: { source: "terrain", exaggeration: 1.5 },
  },
});