aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--example.html2
-rw-r--r--main.js47
2 files changed, 48 insertions, 1 deletions
diff --git a/example.html b/example.html
index 31bd0f1..c3129a3 100644
--- a/example.html
+++ b/example.html
@@ -23,6 +23,6 @@
knappen uppe till höger så öpnar hela kartan i en ny flik. Där kan
man välja lager, ladda ner kartan som PNG-fil, och få information om
de olika föremålen.</p>
- <iframe src="/#z=0&basemap=topowebb_nedtonad&layers=svk_lines+svk_pylons+svk_stations+svk_planned+mrr_appr_ec+mrr_appl_ec+mrr_appr_ogd+mrr_appl_ogd+mrr_appr_met+mrr_appl_met+mrr_appr_dl+mrr_appr_pc+vbk_area_current+vbk_station_completed+vbk_station_processed+vbk_station_approved" title="Webbkarta" width=500 height=600></iframe>
+ <iframe src="/#z=0&basemap=topowebb_nedtonad&layers=svk_lines+svk_pylons+svk_stations+svk_planned+mrr_appr_ec+mrr_appl_ec+mrr_appr_ogd+mrr_appl_ogd+mrr_appr_met+mrr_appl_met+mrr_appr_dl+mrr_appr_pc+vbk_area_current+vbk_station_completed+vbk_station_processed+vbk_station_approved+gigafactories" title="Webbkarta" width=500 height=600></iframe>
</body>
</html>
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',
},