From 5675a32a1aa381bf2ebb21f51aee26b8d4c6ffdb Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 22 Jul 2025 16:22:23 +0200 Subject: Show county and municipality boundaries. --- main.js | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 18163cb..6c58c17 100644 --- a/main.js +++ b/main.js @@ -735,6 +735,35 @@ const ageFilterSettings = (function() { * WebGL, which is currently blocking on https://github.com/openlayers/openlayers/issues/15807 * and https://github.com/openlayers/openlayers/issues/16246 */ const LAYERS = Object.seal({ + adm: { + lansyta: { + legend: { zoomLevel: 3, type: 'linestring' }, + style: [1.5, 2, 3, 3, 4, 4, 6, 6, 8, 8, 10, 10].map(function(width) { + return new Style({ + zIndex: 0, + fill: null, + stroke: new Stroke({ + width: width, + color: [212, 147, 208, 1], + }), + }); + }), + }, + kommunyta: { + legend: null, + style: [2, 2, 3, 3, 4, 4, 6, 6, 8, 8, 10, 10].map(function(width) { + return new Style({ + zIndex: 0, + fill: null, + stroke: new Stroke({ + width: width/2, + color: [212, 147, 208, 1], + }), + }); + }), + }, + }, + mrr: { appr_ec: { legend: { zoomLevel: 4 }, @@ -2766,7 +2795,7 @@ const mapLayers = (function() { /* Note: layers are added in the order below, so leave SvK and * misc at the end so they show up on top of suface features */ const rasterLayers = ['kskog']; - const vectorLayers = ['nv', 'mrr', 'skydd', 'ren', 'ri', 'avverk', 'vbk', 'svk', 'misc']; + const vectorLayers = ['adm', 'nv', 'mrr', 'skydd', 'ren', 'ri', 'avverk', 'vbk', 'svk', 'misc']; const canFilterByAge = ['avverk', 'mrr', 'vbk']; /* layers for which features are dated */ const ret = {}; @@ -3246,6 +3275,11 @@ const layerHierarchy = [ }, ] }, + { + text: 'Administrativa gränser', + type: 'switch', + layer: ['adm.lansyta', 'adm.kommunyta'], + }, ]; /* legend panel */ -- cgit v1.2.3