# Mapterhorn terrain provider for CesiumJS

**URL:** <https://community.cesium.com/t/mapterhorn-terrain-provider-for-cesiumjs/47548>\
**Category:** CesiumJS\
**Created:** [October 11, 2026, 7:29pm UTC](https://community.cesium.com/t/mapterhorn-terrain-provider-for-cesiumjs/47548 "2026-10-11T19:29:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bertt](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/bertt/32/2702_2.png) [@bertt](https://community.cesium.com/u/bertt)\
**Post date:** [October 11, 2026, 7:29pm UTC](https://community.cesium.com/t/mapterhorn-terrain-provider-for-cesiumjs/47548/1 "2026-10-11T19:29:50Z")

</div>

cesium-mapterhorn-provider is a small open-source terrain provider that lets CesiumJS use [Mapterhorn](https://mapterhorn.com/) as a terrain source. Mapterhorn serves global elevation data as Terrarium-encoded 512 px WebP tiles in the XYZ / Web Mercator scheme, so it works without a Cesium ion token or a custom tile server.

- **Live demo:** [Cesium + Mapterhorn terrain](https://bertt.github.io/cesium-mapterhorn-provider/) (3D view of the Matterhorn with aerial imagery, a terrain exaggeration slider, and a field to change the tile URL)
- **Source:** [GitHub - bertt/cesium-mapterhorn-provider: CesiumJS terrain provider for Mapterhorn (Terrarium-encoded WebP) tiles · GitHub](https://github.com/bertt/cesium-mapterhorn-provider)
- **npm:** [https://www.npmjs.com/package/@bertt/cesium-mapterhorn-provider](https://www.npmjs.com/package/@bertt/cesium-mapterhorn-provider)

 ![image](https://global.discourse-cdn.com/cesium/original/3X/c/7/c7b09a8da22aadc6d52b3ed5528d41b5adc8a53c.jpeg)

## Features

- Configurable tile URL template (default `https://tiles.mapterhorn.com/{z}/{x}/{y}.webp`), so you can point it at your own mirror
- Decodes Terrarium heights (`R * 256 + G + B / 256 - 32768`) and resamples each tile to a configurable heightmap grid
- Available as an ES module and as a browser global build for use with a script tag
- Tested against CesiumJS 1.146

## Quick start

```js
import { Viewer } from "cesium";
import { MapterhornTerrainProvider } from "@bertt/cesium-mapterhorn-provider";

const viewer = new Viewer("cesiumContainer", {
  terrainProvider: new MapterhornTerrainProvider({
    url: "https://tiles.mapterhorn.com/{z}/{x}/{y}.webp",
  }),
});

```

## Status

This is an early 0.1.0 release. The provider generates heightmap terrain only, with no vertex normals or water mask, and the maximum zoom level is assumed to be 17. Feedback, issues and pull requests are welcome.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Chemla](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jonathan_chemla/32/2153_2.png) [@Jonathan\_Chemla](https://community.cesium.com/u/Jonathan_Chemla)\
**Post date:** [October 19, 2026, 8:58am UTC](https://community.cesium.com/t/mapterhorn-terrain-provider-for-cesiumjs/47548/3 "2026-10-19T08:58:59Z")

</div>

Nice one!

If you want to contribute the whole feature-set or comment on an existing thread, there has also been demand for Terrarium or TerrainRGB encoded TMS/XYZ tilesets over there [Add support for additional terrain encodings TerrainRGB, Terrarium · Issue #13035 · CesiumGS/cesium · GitHub](https://github.com/CesiumGS/cesium/issues/13035) for CesiumJS or at some point even Cesium-Native for Unreal Engine etc integration!

OP also mentions some additional terrain providers using these encodings if helpful.
