changeset 2157:8be0fbac2297

Added layer for waterway profiles.
author Sascha Wilde <wilde@intevation.de>
date Fri, 08 Feb 2019 12:42:46 +0100
parents 9c7078e157b8
children 7bd485bf85e8 5fdeb41f3ed4
files client/src/components/Maplayer.vue client/src/store/map.js schema/demo-data/published_services.sql
diffstat 3 files changed, 34 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/Maplayer.vue	Fri Feb 08 12:37:38 2019 +0100
+++ b/client/src/components/Maplayer.vue	Fri Feb 08 12:42:46 2019 +0100
@@ -245,6 +245,20 @@
       )
     );
 
+    layer = this.getLayerByName("Waterway Profiles");
+    layer.data.getSource().setLoader(
+      this.buildVectorLoader(
+        {
+          featureNS: "gemma",
+          featurePrefix: "gemma",
+          featureTypes: ["waterway_profiles"],
+          geometryName: "geom"
+        },
+        "/internal/wfs",
+        layer.data.getSource()
+      )
+    );
+
     layer = this.getLayerByName("Distance marks");
     layer.data.getSource().setLoader(
       this.buildVectorLoader(
--- a/client/src/store/map.js	Fri Feb 08 12:37:38 2019 +0100
+++ b/client/src/store/map.js	Fri Feb 08 12:42:46 2019 +0100
@@ -42,6 +42,7 @@
   FAIRWAYDIMENSIONSLOS2: "Fairway Dimensions LOS 2",
   FAIRWAYDIMENSIONSLOS3: "Fairway Dimensions LOS 3",
   WATERWAYAXIS: "Waterway Axis",
+  WATERWAYPROFILES: "Waterway Profiles",
   BOTTLENECKS: "Bottlenecks",
   BOTTLENECKISOLINE: "Bottleneck isolines",
   DISTANCEMARKS: "Distance marks",
@@ -228,6 +229,23 @@
         showInLegend: true
       },
       {
+        name: LAYERS.WATERWAYPROFILES,
+        data: new VectorLayer({
+          source: new VectorSource({
+            strategy: bboxStrategy
+          }),
+          style: new Style({
+            stroke: new Stroke({
+              color: "rgba(0, 0, 255, .5)",
+              lineDash: [5, 5],
+              width: 2
+            })
+          })
+        }),
+        isVisible: true,
+        showInLegend: true
+      },
+      {
         name: LAYERS.BOTTLENECKS,
         data: new VectorLayer({
           source: new VectorSource({
--- a/schema/demo-data/published_services.sql	Fri Feb 08 12:37:38 2019 +0100
+++ b/schema/demo-data/published_services.sql	Fri Feb 08 12:42:46 2019 +0100
@@ -19,4 +19,5 @@
     ('waterway.bottlenecks_geoserver'),
     ('waterway.bottleneck_overview'),
     ('waterway.waterway_axis'),
-    ('waterway.waterway_area')
+    ('waterway.waterway_area'),
+    ('waterway.waterway_profiles')