From dc63bd4ee1fbcea7cf816c0470f22fb954afcc3a Mon Sep 17 00:00:00 2001 From: Manuel Kasper Date: Sat, 6 Mar 2021 20:53:12 +0100 Subject: [PATCH] Add slope classes to swisstopo map --- src/assets/swisstopo.json | 33 ++++++++++++++++++++++++---- src/components/MapOptionsControl.vue | 3 +++ src/components/SwisstopoInfo.vue | 1 + 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/assets/swisstopo.json b/src/assets/swisstopo.json index 3928657..51f9340 100644 --- a/src/assets/swisstopo.json +++ b/src/assets/swisstopo.json @@ -32,28 +32,40 @@ "tiles": [ "https://wmts.geo.admin.ch/1.0.0/ch.swisstopo-karto.skitouren/default/current/3857/{z}/{x}/{y}.png" ], - "tileSize": 256 + "tileSize": 256, + "maxzoom": 17 }, "snowshoe_trails_raster": { "type": "raster", "tiles": [ "https://wmts.geo.admin.ch/1.0.0/ch.swisstopo-karto.schneeschuhrouten/default/current/3857/{z}/{x}/{y}.png" ], - "tileSize": 256 + "tileSize": 256, + "maxzoom": 17 }, "wildlife_areas": { "type": "raster", "tiles": [ "https://wmts.geo.admin.ch/1.0.0/ch.bafu.wrz-wildruhezonen_portal/default/current/3857/{z}/{x}/{y}.png" ], - "tileSize": 256 + "tileSize": 256, + "maxzoom": 18 }, "wildlife_reserves": { "type": "raster", "tiles": [ "https://wmts.geo.admin.ch/1.0.0/ch.bafu.wrz-jagdbanngebiete_select/default/current/3857/{z}/{x}/{y}.png" ], - "tileSize": 256 + "tileSize": 256, + "maxzoom": 18 + }, + "slope_classes": { + "type": "raster", + "tiles": [ + "https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.hangneigung-ueber_30/default/current/3857/{z}/{x}/{y}.png" + ], + "tileSize": 256, + "maxzoom": 16 }, "summits": { "type": "vector", @@ -136,6 +148,19 @@ "raster-resampling": "linear" } }, + { + "id": "slope_classes", + "type": "raster", + "metadata": { + "sotlas-map-option": "slope_classes" + }, + "source": "slope_classes", + "layout": {"visibility": "none"}, + "paint": { + "raster-opacity": 0.3, + "raster-resampling": "linear" + } + }, { "id": "contour_line", "type": "line", diff --git a/src/components/MapOptionsControl.vue b/src/components/MapOptionsControl.vue index dfcee85..0dce665 100644 --- a/src/components/MapOptionsControl.vue +++ b/src/components/MapOptionsControl.vue @@ -31,6 +31,9 @@ Schneeschuhrouten + + Hangneigungsklassen über 30° + Wildruhezonen und Schutzgebiete diff --git a/src/components/SwisstopoInfo.vue b/src/components/SwisstopoInfo.vue index 5355694..d1ddb13 100644 --- a/src/components/SwisstopoInfo.vue +++ b/src/components/SwisstopoInfo.vue @@ -14,6 +14,7 @@