Logos und ein bisschen Layout

This commit is contained in:
2026-04-27 22:43:17 +02:00
parent 0a6b638004
commit 8a9911c28c
5 changed files with 120 additions and 28 deletions

73
main.js
View File

@@ -102,32 +102,52 @@ function changeBaseMap(newMap){
}
break;
case "satellite_terrain":
basemapStyle = {
version: 8,
sources: {
"satellite": {
type: "raster",
tiles: [
"https://mt0.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
"https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
"https://mt2.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
"https://mt3.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
basemapStyle = {
version: 8,
sources: {
osm: {
type: 'raster',
tiles: [
"https://mt0.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
"https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
"https://mt2.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
"https://mt3.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
],
tileSize: 256,
},
// ── Elevation data ──────────────────────────
"terrarium": {
type: "raster-dem",
tiles: ["https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png"],
tileSize: 256,
encoding: "terrarium",
maxzoom: 15
},
},
layers: [{ id: "satellite", type: "raster", source: "satellite" }],
// 2-fache Überhöhung
terrain: { source: "terrarium", exaggeration: 2 },
}
tileSize: 256,
attribution: '© OpenStreetMap Contributors',
maxzoom: 19
},
// Use a different source for terrain and hillshade layers, to improve render quality
terrainSource: {
type: 'raster-dem',
url: 'https://tiles.mapterhorn.com/tilejson.json',
},
hillshadeSource: {
type: 'raster-dem',
url: 'https://tiles.mapterhorn.com/tilejson.json'
}
},
layers: [
{
id: 'osm',
type: 'raster',
source: 'osm'
},
{
id: 'hills',
type: 'hillshade',
source: 'hillshadeSource',
layout: {visibility: 'visible'},
paint: {'hillshade-shadow-color': '#473B24'}
}
],
terrain: {
source: 'terrainSource',
exaggeration: 1
},
sky: {}
}
}
map.setStyle(basemapStyle);
}
@@ -142,4 +162,5 @@ selectElement.addEventListener('change', (event) => {
// Karte auf Nord zurücksetzen
document.getElementById("resetBtn").addEventListener("click", () => {
map.resetNorth();
});
});