diff client/src/map/Maplayer.vue @ 842:ee6f127f573c

client: add first prototype for bottleneck iso layer * Add prototype with internal direct url and TOTOISOs markings.
author Bernhard Reiter <bernhard@intevation.de>
date Fri, 28 Sep 2018 11:27:07 +0200
parents d9da1ea14abf
children d2aa972df342
line wrap: on
line diff
--- a/client/src/map/Maplayer.vue	Fri Sep 28 11:23:50 2018 +0200
+++ b/client/src/map/Maplayer.vue	Fri Sep 28 11:27:07 2018 +0200
@@ -277,6 +277,13 @@
           });
       };
       return loader;
+    },
+    // TODOISO call if new survey is selected
+    updateBottleneckFilter(datestr) {
+      console.log(datestr);
+      var wmsSrc = this.getLayerByName("Bottleneck isolines").data.getSource();
+      // TODOISO check if this works
+      wmsSrc.updateParams({cql_filter: "date_info = '" + datestr + "'"});
     }
   },
   watch: {
@@ -309,6 +316,7 @@
     });
     this.$store.commit("mapstore/setOpenLayersMap", map);
 
+
     // TODO make display of layers more dynamic, e.g. from a list
 
     // loading the full WFS layer, by not setting the loader function
@@ -430,6 +438,10 @@
       )
     );
 
+    // so none is shown
+    // this.updateBottleneckFilter("1999-10-01");
+    // test date
+    this.updateBottleneckFilter("2018-08-30");
     this.activateIdentifyMode();
   }
 };