Hintergrundkarten verändert

This commit is contained in:
2026-05-21 17:12:09 +02:00
parent ac295f8991
commit 3b4383fdb0
+23 -22
View File
@@ -185,27 +185,31 @@ function changeBaseMap(newMap){
"raster-tiles": { "raster-tiles": {
type: "raster", type: "raster",
tiles: [ tiles: [
"https://mt0.google.com/vt/lyrs=s&x={x}&y={y}&z={z}", "https://api.maptiler.com/tiles/satellite-v2/{z}/{x}/{y}.jpg?key=6mG881AthmTTWyLvFyjH"
"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, tileSize: 256,
attribution: "© MapTiler",
maxzoom: 20
}
}, },
}, layers: [
layers: [{ id: "raster-layer", type: "raster", source: "raster-tiles" }], {
id: "satellite-layer",
type: "raster",
source: "raster-tiles"
}
]
} }
break; break;
case "terrain": case "terrain":
basemapStyle = { basemapStyle = {
version: 8, version: 8,
sources: { sources: {
osm: { topo: {
type: 'raster', type: 'raster',
tiles: ['https://a.tile.openstreetmap.org/{z}/{x}/{y}.png'], url: 'https://api.maptiler.com/maps/topo-v4/tiles.json?key=6mG881AthmTTWyLvFyjH',
tileSize: 256, tileSize: 256,
attribution: '© OpenStreetMap Contributors', maxzoom: 20
maxzoom: 19
}, },
// Use a different source for terrain and hillshade layers, to improve render quality // Use a different source for terrain and hillshade layers, to improve render quality
terrainSource: { terrainSource: {
@@ -219,9 +223,9 @@ function changeBaseMap(newMap){
}, },
layers: [ layers: [
{ {
id: 'osm', id: 'topo',
type: 'raster', type: 'raster',
source: 'osm' source: 'topo'
}, },
{ {
id: 'hills', id: 'hills',
@@ -242,17 +246,14 @@ function changeBaseMap(newMap){
basemapStyle = { basemapStyle = {
version: 8, version: 8,
sources: { sources: {
osm: { "raster-tiles": {
type: 'raster', type: "raster",
tiles: [ tiles: [
"https://mt0.google.com/vt/lyrs=s&x={x}&y={y}&z={z}", "https://api.maptiler.com/tiles/satellite-v2/{z}/{x}/{y}.jpg?key=6mG881AthmTTWyLvFyjH"
"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, tileSize: 256,
attribution: '© OpenStreetMap Contributors', attribution: "© MapTiler",
maxzoom: 19 maxzoom: 20
}, },
// Use a different source for terrain and hillshade layers, to improve render quality // Use a different source for terrain and hillshade layers, to improve render quality
terrainSource: { terrainSource: {
@@ -266,9 +267,9 @@ function changeBaseMap(newMap){
}, },
layers: [ layers: [
{ {
id: 'osm', id: 'raster-tiles',
type: 'raster', type: 'raster',
source: 'osm' source: 'raster-tiles'
}, },
{ {
id: 'hills', id: 'hills',