diff client/src/components/map/layers.js @ 3335:59db0b5921c5

client: added layer for fairway availability diagrams with demo diagrams
author Markus Kottlaender <markus@intevation.de>
date Mon, 20 May 2019 17:34:43 +0200
parents 80037790032d
children b01bf2399c20
line wrap: on
line diff
--- a/client/src/components/map/layers.js	Mon May 20 17:14:47 2019 +0200
+++ b/client/src/components/map/layers.js	Mon May 20 17:34:43 2019 +0200
@@ -460,6 +460,34 @@
           source
         });
       })(),
+      (function() {
+        const source = new VectorSource({ strategy: bboxStrategy });
+        source.setLoader(
+          buildVectorLoader(
+            {
+              featureTypes: ["bottlenecks_geoserver"],
+              geometryName: "area"
+            },
+            source,
+            false,
+            async f => {
+              if (f.get("fa_critical")) {
+                f.set("fa_data", []);
+              }
+              return f;
+            }
+          )
+        );
+        return new VectorLayer({
+          id: "BOTTLENECKFAIRWAYAVAILABILITY",
+          label: "Bottlenecks Fairway Availability",
+          forLegendStyle: { point: true, resolution: 16 },
+          visible: false,
+          zIndex: 1,
+          style: styles.bottleneckFairwayAvailability,
+          source
+        });
+      })(),
       new ImageLayer({
         id: "DISTANCEMARKS",
         label: "Distance Marks",