changeset 790:1b82ae5e637e

client: add bottleneck layer with first styling
author Bernhard Reiter <bernhard@intevation.de>
date Thu, 27 Sep 2018 08:52:17 +0200
parents 9f3a4a60dc04
children 8d96204a786a
files client/src/map/Maplayer.vue client/src/map/store.js
diffstat 2 files changed, 32 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/map/Maplayer.vue	Thu Sep 27 08:15:28 2018 +0200
+++ b/client/src/map/Maplayer.vue	Thu Sep 27 08:52:17 2018 +0200
@@ -411,6 +411,20 @@
     );
     layer.data.setVisible(layer.isVisible);
 
+    layer = this.getLayerByName("Bottlenecks");
+    layer.data.getSource().setLoader(
+      this.buildVectorLoader(
+        {
+          featureNS: "gemma",
+          featurePrefix: "gemma",
+          featureTypes: ["bottlenecks"],
+          geometryName: "area"
+        },
+        "/internal/wfs",
+        layer.data.getSource()
+      )
+    );
+
     this.activateIdentifyMode();
   }
 };
--- a/client/src/map/store.js	Thu Sep 27 08:15:28 2018 +0200
+++ b/client/src/map/store.js	Thu Sep 27 08:52:17 2018 +0200
@@ -147,6 +147,24 @@
           }
         }),
         isVisible: true
+      },
+      {
+        name: "Bottlenecks",
+        data: new VectorLayer({
+          source: new VectorSource({
+            strategy: bboxStrategy
+          }),
+          style: new Style({
+            stroke: new Stroke({
+              color: "rgba(230, 230, 10, .8)",
+              width: 4
+            }),
+            fill: new Fill({
+              color: "rgba(230, 230, 10, .3)"
+            })
+          })
+        }),
+        isVisible: true
       }
     ],
     identifiedFeatures: []