changeset 935:430d52c2f6ef

client: move layer isolines to be drawn at the top * Move layer isolones to be drawn last (and thus being "on top") so that the bottleneck (position) layer will not interfere that much with the colours. It also allows to set a white background with high opacity on the bottleneck polygon in order to get highly visible isolines.
author Bernhard Reiter <bernhard@intevation.de>
date Mon, 08 Oct 2018 17:20:42 +0200
parents e6220a19f284
children f27fe4e9bfd9
files client/src/map/store.js
diffstat 1 files changed, 27 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/map/store.js	Mon Oct 08 15:18:26 2018 +0200
+++ b/client/src/map/store.js	Mon Oct 08 17:20:42 2018 +0200
@@ -32,33 +32,6 @@
         isVisible: true
       },
       {
-        name: "Bottleneck isolines",
-        data: new TileLayer({
-          source: new TileWMS({
-            preload: 0,
-            projection: "EPSG:3857",
-            url: window.location.origin + "/api/internal/wms",
-            params: {
-              LAYERS: "sounding_results_contour_lines_geoserver",
-              VERSION: "1.1.1",
-              TILED: true
-            },
-            tileLoadFunction: function(tile, src) {
-              // console.log("calling for", tile, src);
-              HTTP.get(src, {
-                headers: {
-                  "X-Gemma-Auth": localStorage.getItem("token")
-                },
-                responseType: "blob"
-              }).then(response => {
-                tile.getImage().src = URL.createObjectURL(response.data);
-              });
-            } // TODO  tile.setState(TileState.ERROR);
-          })
-        }),
-        isVisible: true
-      },
-      {
         name: "Fairway Dimensions",
         data: new VectorLayer({
           source: new VectorSource(),
@@ -195,6 +168,33 @@
           })
         }),
         isVisible: true
+      },
+      {
+        name: "Bottleneck isolines",
+        data: new TileLayer({
+          source: new TileWMS({
+            preload: 0,
+            projection: "EPSG:3857",
+            url: window.location.origin + "/api/internal/wms",
+            params: {
+              LAYERS: "sounding_results_contour_lines_geoserver",
+              VERSION: "1.1.1",
+              TILED: true
+            },
+            tileLoadFunction: function(tile, src) {
+              // console.log("calling for", tile, src);
+              HTTP.get(src, {
+                headers: {
+                  "X-Gemma-Auth": localStorage.getItem("token")
+                },
+                responseType: "blob"
+              }).then(response => {
+                tile.getImage().src = URL.createObjectURL(response.data);
+              });
+            } // TODO  tile.setState(TileState.ERROR);
+          })
+        }),
+        isVisible: true
       }
     ],
     // note that some identified features may not have an id