fixes map attribution && adds OpenFreeMap

This commit is contained in:
Christian Beutel
2025-06-21 13:44:11 +02:00
parent b5a3864f04
commit 369202ec42
5 changed files with 9 additions and 30 deletions

View File

@@ -4,8 +4,8 @@ description: How to customize the map with user defined tile sets
---
<span class="-tracking-[0.075em]">wanderer</span> is compatible with any provider of vector tile maps (e.g. CARTO, mapbox, maptiler, or self-hosted OpenMapTiles). Out of the box it comes with 4 different map styles:
1. Open Street Maps
2. Open Topo Maps
1. OpenFreeMap
2. OpenTopoMap
3. CARTO Light
4. CARTO Dark

View File

@@ -866,12 +866,12 @@
}),
),
{
text: "Open Street Maps",
value: "/styles/osm.json",
text: "OpenFreeMap",
value: "https://tiles.openfreemap.org/styles/liberty",
thumbnail: "https://tile.openstreetmap.org/1/0/0.png",
},
{
text: "Open Topo Maps",
text: "OpenTopoMap",
value: "/styles/otm.json",
thumbnail: "https://tile.opentopomap.org/1/0/0.png",
},
@@ -907,7 +907,7 @@
mapStyles[preferredMapStyleIndex].value ??
mapStyles[0].value,
center: [initialState.lng, initialState.lat],
zoom: initialState.zoom,
zoom: initialState.zoom
},
...mapOptions,
};

View File

@@ -658,7 +658,7 @@
elevationProfileContainer={"epc-container"}
showStyleSwitcher={false}
showFullscreen={true}
mapOptions={{ attributionControl: false }}
mapOptions={{ attributionControl: {compact: true} }}
onfullscreen={toggleMapFullScreen}
bind:markers
></MapWithElevationMaplibre>

View File

@@ -1,22 +0,0 @@
{
"version": 8,
"sources": {
"osm-tiles": {
"type": "raster",
"tiles": [
"https://tile.openstreetmap.org/{z}/{x}/{y}.png"
],
"tileSize": 256
}
},
"glyphs": "https://tiles.basemaps.cartocdn.com/fonts/{fontstack}/{range}.pbf",
"layers": [
{
"id": "osm-tiles",
"type": "raster",
"source": "osm-tiles",
"minzoom": 0,
"maxzoom": 19
}
]
}

View File

@@ -6,7 +6,8 @@
"tiles": [
"https://tile.opentopomap.org/{z}/{x}/{y}.png"
],
"tileSize": 256
"tileSize": 256,
"attribution": "© OpenTopoMap"
}
},
"glyphs": "https://tiles.basemaps.cartocdn.com/fonts/{fontstack}/{range}.pbf",