# HG changeset patch # User Sascha L. Teichmann # Date 1566466064 -7200 # Node ID df198705300ed918f6a3d9ce3448227915416891 # Parent 4394daeea96ae6e0a83980bf2cc476c347fa35fc# Parent 27434b0d4d963777e6613e2c4f9baf012e464351 Merged default into json-handler-middleware branch. diff -r 4394daeea96a -r df198705300e client/src/components/map/Map.vue --- 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); diff -r 4394daeea96a -r df198705300e client/src/components/map/layers.js --- 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 = ( diff -r 4394daeea96a -r df198705300e client/src/components/map/styles.js --- 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 };