diff client/src/map/store.js @ 733:e57955c1996f

client: improve code structure * Change loading strategy for waterway axis to bbox mainly for consistency. Its size is small compared to other WFS features, so the speed gain is not big by changing to dynamic loading. * Use getLayerByName() instead of hard references. * Refactor section about loading layers to be shorter and to reference the name of each layer only once.
author Bernhard Reiter <bernhard@intevation.de>
date Mon, 24 Sep 2018 09:23:09 +0200
parents 22159077b564
children f2691e0d4970
line wrap: on
line diff
--- a/client/src/map/store.js	Sun Sep 23 19:51:02 2018 +0200
+++ b/client/src/map/store.js	Mon Sep 24 09:23:09 2018 +0200
@@ -75,7 +75,9 @@
       {
         name: "Waterway Axis",
         data: new VectorLayer({
-          source: new VectorSource(),
+          source: new VectorSource({
+            strategy: bboxStrategy
+          }),
           style: new Style({
             stroke: new Stroke({
               color: "rgba(0, 0, 255, .5)",