aboutsummaryrefslogtreecommitdiffstats
path: root/main.js
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-01-31 07:02:43 +0100
committerGuilhem Moulin <guilhem@fripost.org>2024-01-31 07:15:47 +0100
commit30be28b8e3a2143db8a69c873cdaed56dfc0e6e0 (patch)
tree9135490ed07ed188fdeff081dfcad07041474e2f /main.js
parentfff0407ca9148df17f627c6f7f956194bb1328f7 (diff)
Add layer for gigafactories (own drawing).
Diffstat (limited to 'main.js')
-rw-r--r--main.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/main.js b/main.js
index f48f6a6..fb5d0ad 100644
--- a/main.js
+++ b/main.js
@@ -1384,6 +1384,49 @@ const layers = {
});
}),
},
+
+ gigafactories: {
+ popoverTitle: 'Stor industrisatsning',
+ popover: [
+ ['Namn', 'name'],
+ ['Länk', 'url', { fn: function(v) {
+ const a = document.createElement('a');
+ a.href = v;
+ a.target = '_blank';
+ const i = document.createElement('i');
+ i.classList.add('bi', 'bi-box-arrow-up-right');
+ a.appendChild(i);
+ return a;
+ }}],
+ ],
+ style: [4, 6, 7, 8, 10, 12].map(function(width) {
+ return new Style({
+ zIndex: 60,
+ image: new CircleStyle({
+ radius: width,
+ fill: new Fill({
+ color: 'rgb(152, 78, 163)',
+ }),
+ stroke: new Stroke({
+ width: Math.log2(width) * 2/5,
+ color: 'rgb(119, 61, 128)',
+ }),
+ }),
+ });
+ })
+ .concat([1.5, 2, 2, 2, 2, 2].map(function(width) {
+ return new Style({
+ zIndex: 58,
+ fill: new Fill({
+ color: 'rgba(152, 78, 163, .4)',
+ }),
+ stroke: new Stroke({
+ width: width,
+ color: 'rgb(119, 61, 128)',
+ }),
+ });
+ })),
+ }
};
const layerHierarchy = [
@@ -1405,6 +1448,10 @@ const layerHierarchy = [
],
},
{
+ text: 'Sora industrisatsningar',
+ layer: 'gigafactories',
+ },
+ {
text: 'Dammar',
layer: 'smhi_dam',
},