All examplesMaps
Find the elevation of a point
Click the map to read elevation in metres from the active DEM. Coverage is worldwide within Web Mercator, and source datums and models vary. After a rollback, the Canadian MRDEM serves again. Check /coverage.json.
live result
the code that produced it
import { Unmap } from "@unmap/sdk";
const unmap = new Unmap({
key: "um_live_...",
container: "map",
center: [-114.0719, 51.0447],
zoom: 11,
});
const [metres] = await unmap.elevation.get([-114.0719, 51.0447]);
unmap.map!.on("click", async (e) => {
const [here] = await unmap.elevation.get([e.lngLat.lng, e.lngLat.lat]);
console.log(here === null ? "no data here" : `${here} m`);
});A click with no data or beyond approximately ±85.0511° returns null, meaning missing data.
Ocean zero may be fill rather than a measured sea level.
The Elevation API documents the endpoint behind this example.