aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-07-22 16:22:23 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-07-22 17:35:58 +0200
commit5675a32a1aa381bf2ebb21f51aee26b8d4c6ffdb (patch)
tree8d95d35265118fcc6779894d3cd8aaf750502143
parent7b30aa2135c672ac3dc723f5bdeac216e815e518 (diff)
Show county and municipality boundaries.
-rw-r--r--main.js36
1 files changed, 35 insertions, 1 deletions
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 */