3 Commits

Author SHA1 Message Date
vcoppe
375204c379 New Crowdin updates (#304)
* New translations en.json (Dutch)

* New translations en.json (Czech)

* New translations en.json (Spanish)

* New translations file.mdx (Vietnamese)

* New translations en.json (Polish)
2026-01-28 17:54:01 +01:00
vcoppe
d76c03af4f add try catch to setTerrain 2026-01-28 17:53:26 +01:00
vcoppe
200a6586ba remove unused glyphs url with empty key causing problems 2026-01-28 17:53:12 +01:00
7 changed files with 20 additions and 16 deletions

View File

@@ -17,7 +17,6 @@
} }
}, },
"sprite": "https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite", "sprite": "https://demotiles.maplibre.org/styles/osm-bright-gl-style/sprite",
"glyphs": "https://api.maptiler.com/fonts/{fontstack}/{range}.pbf?key={key}",
"layers": [ "layers": [
{ {
"id": "background", "id": "background",

View File

@@ -212,6 +212,7 @@ export class MapboxGLMap {
const map = get(this._map); const map = get(this._map);
if (map) { if (map) {
const source = get(terrainSource); const source = get(terrainSource);
try {
if (!map.getSource(source)) { if (!map.getSource(source)) {
map.addSource(source, terrainSources[source]); map.addSource(source, terrainSources[source]);
} }
@@ -223,6 +224,10 @@ export class MapboxGLMap {
} else { } else {
map.setTerrain(null); map.setTerrain(null);
} }
} catch (e) {
// No reliable way to check if the map is ready to add sources and layers
return;
}
} }
} }
} }

View File

@@ -31,7 +31,7 @@ Create a copy of the currently selected files.
### <FileX size="16" class="inline-block" style="margin-bottom: 2px" /> Delete ### <FileX size="16" class="inline-block" style="margin-bottom: 2px" /> Delete
Delete the currently selected files. .
### <FileX size="16" class="inline-block" style="margin-bottom: 2px" /> Delete all ### <FileX size="16" class="inline-block" style="margin-bottom: 2px" /> Delete all

View File

@@ -282,7 +282,7 @@
"update": "Aktualizovat vrstvu" "update": "Aktualizovat vrstvu"
}, },
"opacity": "Průhlednost překryvu", "opacity": "Průhlednost překryvu",
"terrain": "Terrain source", "terrain": "Zdroj terénu",
"label": { "label": {
"basemaps": "Základní mapy", "basemaps": "Základní mapy",
"overlays": "Překrytí", "overlays": "Překrytí",

View File

@@ -282,7 +282,7 @@
"update": "Actualizar capa" "update": "Actualizar capa"
}, },
"opacity": "Opacidad de la capa superpuesta", "opacity": "Opacidad de la capa superpuesta",
"terrain": "Terrain source", "terrain": "Origen del terreno",
"label": { "label": {
"basemaps": "Mapas base", "basemaps": "Mapas base",
"overlays": "Capas", "overlays": "Capas",

View File

@@ -282,7 +282,7 @@
"update": "Update laag" "update": "Update laag"
}, },
"opacity": "Laag Transparantie", "opacity": "Laag Transparantie",
"terrain": "Terrain source", "terrain": "Terrein bron",
"label": { "label": {
"basemaps": "Basis kaarten", "basemaps": "Basis kaarten",
"overlays": "Lagen", "overlays": "Lagen",

View File

@@ -282,7 +282,7 @@
"update": "Zaktualizuj warstwę" "update": "Zaktualizuj warstwę"
}, },
"opacity": "Przezroczystość nakładki", "opacity": "Przezroczystość nakładki",
"terrain": "Terrain source", "terrain": "Źródło danych terenowych",
"label": { "label": {
"basemaps": "Mapy bazowe", "basemaps": "Mapy bazowe",
"overlays": "Nakładki", "overlays": "Nakładki",