Mercurial > gemma
changeset 859:f82c31428a27
Merged
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Fri, 28 Sep 2018 16:54:24 +0200 |
parents | e653e72769da (current diff) e5ac0fb0c1c5 (diff) |
children | 38b682eaa7b1 |
files | client/src/map/Maplayer.vue |
diffstat | 1 files changed, 27 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/map/Maplayer.vue Fri Sep 28 16:51:17 2018 +0200 +++ b/client/src/map/Maplayer.vue Fri Sep 28 16:54:24 2018 +0200 @@ -441,16 +441,34 @@ ); // TODOSTYLE add backend request (like search for 'HTTP') // and use result to construct a new style like - var newstyle = new Style({ - stroke: new Stroke({ - color: "rgba(230, 30, 10, .8)", - width: 4 - }), - fill: new Fill({ - color: "rgba(230, 30, 10, .3)" + HTTP.get("/system/style/Bottlenecks/stroke", { + headers: { "X-Gemma-Auth": localStorage.getItem("token") } + }) + .then(response => { + this.btlnStrokeC = response.data.code; + HTTP.get("/system/style/Bottlenecks/fill", { + headers: { "X-Gemma-Auth": localStorage.getItem("token") } + }) + .then(response => { + this.btlnFillC = response.data.code; + var newstyle = new Style({ + stroke: new Stroke({ + color: this.btlnStrokeC, + width: 4 + }), + fill: new Fill({ + color: this.btlnFillC + }) + }); + layer.data.setStyle(newstyle); + }) + .catch(error => { + console.log(error); + }); }) - }); - layer.data.setStyle(newstyle); + .catch(error => { + console.log(error); + }); // so none is shown // this.updateBottleneckFilter("1999-10-01", "AT_Bottleneck_44");