mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
terrain example
This commit is contained in:
26
website/public/debug/terrain/terrain.js
Normal file
26
website/public/debug/terrain/terrain.js
Normal file
@@ -0,0 +1,26 @@
|
||||
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')
|
||||
})
|
||||
Reference in New Issue
Block a user