Files
openfreemap/website/public/debug/terrain/terrain.js
2025-10-22 10:10:41 +02:00

26 lines
476 B
JavaScript

const map = new maplibregl.Map({
container: 'map',
hash: 'map',
zoom: 10.5,
center: [9.0788, 47.1194],
style: {
version: 8,
sources: {
hillshadeSource: {
type: 'raster-dem',
url: 'https://tiles.mapterhorn.com/tilejson.json',
},
},
layers: [
{
id: 'hillshade',
type: 'hillshade',
source: 'hillshadeSource',
},
],
},
})
map.on('load', () => {
console.log('Terrain map loaded')
})