Mercurial > gemma
changeset 4245:df198705300e json-handler-middleware
Merged default into json-handler-middleware branch.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 22 Aug 2019 11:27:44 +0200 |
parents | 4394daeea96a (current diff) 27434b0d4d96 (diff) |
children | 5e8dec0073ae |
files | |
diffstat | 3 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/map/Map.vue Thu Aug 22 11:26:48 2019 +0200 +++ b/client/src/components/map/Map.vue Thu Aug 22 11:27:44 2019 +0200 @@ -43,6 +43,7 @@ import { pane } from "@/lib/mixins"; import { layerFactory } from "@/components/map/layers"; import { ImageWMS as ImageSource } from "ol/source"; +import { styles } from "./styles"; import "ol/ol.css"; /* for the sake of debugging */ @@ -350,9 +351,15 @@ }) }); this.layers.get("WATERWAYPROFILES").setStyle(wwpStyle); - this.layers.get("FAIRWAYDIMENSIONSLOS1").setStyle(fwd1Style); - this.layers.get("FAIRWAYDIMENSIONSLOS2").setStyle(fwd2Style); - this.layers.get("FAIRWAYDIMENSIONSLOS3").setStyle(fwd3Style); + this.layers + .get("FAIRWAYDIMENSIONSLOS1") + .setStyle(() => [fwd1Style, styles.textFW1]); + this.layers + .get("FAIRWAYDIMENSIONSLOS2") + .setStyle(() => [fwd2Style, styles.textFW2]); + this.layers + .get("FAIRWAYDIMENSIONSLOS3") + .setStyle(() => [fwd3Style, styles.textFW3]); this.layers.get("SECTIONS").setStyle(secStyle); this.layers.get("STRETCHES").setStyle(strStyle); this.layers.get("BOTTLENECKS").setStyle(btlnStyle);
--- a/client/src/components/map/layers.js Thu Aug 22 11:26:48 2019 +0200 +++ b/client/src/components/map/layers.js Thu Aug 22 11:27:44 2019 +0200 @@ -13,7 +13,7 @@ import OSM from "ol/source/OSM"; import { equalTo } from "ol/format/filter"; import { HTTP } from "@/lib/http"; -import styleFactory from "./styles"; +import { styleFactory } from "./styles"; import store from "@/store/index"; const buildVectorLoader = (
--- a/client/src/components/map/styles.js Thu Aug 22 11:26:48 2019 +0200 +++ b/client/src/components/map/styles.js Thu Aug 22 11:27:44 2019 +0200 @@ -129,7 +129,7 @@ }) }; -export default function(mapId) { +const styleFactory = function(mapId) { return { stretches(feature) { let style = styles.yellow2; @@ -349,4 +349,6 @@ ]; } }; -} +}; + +export { styles, styleFactory };