# HG changeset patch # User Thomas Junk # Date 1553860589 -3600 # Node ID 85dd3f98e18a2ab10e804ce54b99d2f2f03fa815 # Parent 23ff7f6c543b46d98cf0daad95e9cfc4efac4f08 show differences moved up in legend. Switch isolines off when showing differences diff -r 23ff7f6c543b -r 85dd3f98e18a client/src/components/fairway/Profiles.vue --- a/client/src/components/fairway/Profiles.vue Fri Mar 29 12:07:09 2019 +0100 +++ b/client/src/components/fairway/Profiles.vue Fri Mar 29 12:56:29 2019 +0100 @@ -424,6 +424,7 @@ this.additionalSurvey.date_info + "'" }); + this.$store.commit("map/setLayerInvisible", LAYERS.BOTTLENECKISOLINE); this.$store.commit("map/setLayerVisible", LAYERS.DIFFERENCES); }) .catch(error => { diff -r 23ff7f6c543b -r 85dd3f98e18a client/src/store/map.js --- a/client/src/store/map.js Fri Mar 29 12:07:09 2019 +0100 +++ b/client/src/store/map.js Fri Mar 29 12:56:29 2019 +0100 @@ -51,7 +51,7 @@ GAUGES: "Gauges", DRAWTOOL: "Draw Tool", CUTTOOL: "Cut Tool", - DIFFERENCES: "Differences" + DIFFERENCES: "Bottleneck Differences" }; const moveMap = ({ view, extent, zoom, preventZoomOut }) => { @@ -327,6 +327,34 @@ showInLegend: true }, { + name: LAYERS.DIFFERENCES, + data: new TileLayer({ + source: new TileWMS({ + preload: 0, + projection: "EPSG:4326", + url: window.location.origin + "/api/internal/wms", + params: { + LAYERS: "sounding_differences", + 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: false, + showInLegend: true + }, + { name: LAYERS.BOTTLENECKSTATUS, forLegendStyle: { point: true, resolution: 16 }, data: new VectorLayer({ @@ -551,34 +579,6 @@ }), isVisible: true, showInLegend: false - }, - { - name: LAYERS.DIFFERENCES, - data: new TileLayer({ - source: new TileWMS({ - preload: 0, - projection: "EPSG:4326", - url: window.location.origin + "/api/internal/wms", - params: { - LAYERS: "sounding_differences", - 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: false, - showInLegend: true } ] };