Mercurial > gemma
changeset 4600:75d1126f7299
Reordered layers so that features are not covered by new filled morphology.
also change the name of the layer to match the new visualization.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Wed, 09 Oct 2019 16:28:00 +0200 |
parents | a63df1ac39ac |
children | b61979b74d82 |
files | client/src/components/layers/Layers.vue client/src/components/map/layers.js |
diffstat | 2 files changed, 63 insertions(+), 63 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/layers/Layers.vue Wed Oct 09 16:14:51 2019 +0200 +++ b/client/src/components/layers/Layers.vue Wed Oct 09 16:28:00 2019 +0200 @@ -23,14 +23,14 @@ <Layerselect layerId="WATERWAYAREA" /> <Layerselect layerId="STRETCHES" /> <Layerselect layerId="SECTIONS" /> + <Layerselect layerId="BOTTLENECKS" /> + <Layerselect layerId="BOTTLENECKISOLINE" /> + <Layerselect layerId="DIFFERENCES" /> <Layerselect layerId="FAIRWAYDIMENSIONSLOS3" /> <Layerselect layerId="FAIRWAYDIMENSIONSLOS2" /> <Layerselect layerId="FAIRWAYDIMENSIONSLOS1" /> <Layerselect layerId="WATERWAYAXIS" /> <Layerselect layerId="WATERWAYPROFILES" /> - <Layerselect layerId="BOTTLENECKS" /> - <Layerselect layerId="BOTTLENECKISOLINE" /> - <Layerselect layerId="DIFFERENCES" /> <Layerselect layerId="BOTTLENECKSTATUS" /> <Layerselect layerId="BOTTLENECKFAIRWAYAVAILABILITY" /> <Layerselect layerId="DATAAVAILABILITY" />
--- a/client/src/components/map/layers.js Wed Oct 09 16:14:51 2019 +0200 +++ b/client/src/components/map/layers.js Wed Oct 09 16:28:00 2019 +0200 @@ -325,6 +325,66 @@ }); })(), (function() { + return new VectorLayer({ + id: "BOTTLENECKS", + label: "Bottlenecks", + visible: true, + style: styles.bottleneck, + source: bottlenecksSource + }); + })(), + new TileLayer({ + id: "BOTTLENECKISOLINE", + label: "Bottleneck morphology", + visible: false, + source: new TileWMS({ + preload: 0, + projection: "EPSG:3857", + url: window.location.origin + "/api/internal/wms", + params: { + LAYERS: "sounding_results_areas_geoserver", + VERSION: "1.1.1", + TILED: true + }, + tileLoadFunction: function(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); + }) + }), + new TileLayer({ + id: "DIFFERENCES", + label: "Bottleneck Differences", + visible: false, + source: new TileWMS({ + preload: 0, + projection: "EPSG:3857", + url: window.location.origin + "/api/internal/wms", + params: { + LAYERS: "sounding_differences", + VERSION: "1.1.1", + TILED: true, + CQL_FILTER: "id=" + store.state.fairwayprofile.currentDifference + }, + tileLoadFunction: function(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); + }) + }), + (function() { const source = new VectorSource({ strategy: bboxStrategy }); source.setLoader( buildVectorLoader( @@ -449,66 +509,6 @@ })(), (function() { return new VectorLayer({ - id: "BOTTLENECKS", - label: "Bottlenecks", - visible: true, - style: styles.bottleneck, - source: bottlenecksSource - }); - })(), - new TileLayer({ - id: "BOTTLENECKISOLINE", - label: "Bottleneck isolines", - visible: false, - source: new TileWMS({ - preload: 0, - projection: "EPSG:3857", - url: window.location.origin + "/api/internal/wms", - params: { - LAYERS: "sounding_results_areas_geoserver", - VERSION: "1.1.1", - TILED: true - }, - tileLoadFunction: function(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); - }) - }), - new TileLayer({ - id: "DIFFERENCES", - label: "Bottleneck Differences", - visible: false, - source: new TileWMS({ - preload: 0, - projection: "EPSG:3857", - url: window.location.origin + "/api/internal/wms", - params: { - LAYERS: "sounding_differences", - VERSION: "1.1.1", - TILED: true, - CQL_FILTER: "id=" + store.state.fairwayprofile.currentDifference - }, - tileLoadFunction: function(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); - }) - }), - (function() { - return new VectorLayer({ id: "BOTTLENECKSTATUS", label: "Critical Bottlenecks", forLegendStyle: { point: true, resolution: 16 },