# HG changeset patch # User Markus Kottlaender # Date 1557922545 -7200 # Node ID b74e9768231da20ade3f04c412e3fc6507108f08 # Parent d7bc51fd50b0a3adc2ba47c564cc4888346f418a client: map layers: added support for vuex store in layer configuration diff -r d7bc51fd50b0 -r b74e9768231d client/src/components/map/layers.js --- a/client/src/components/map/layers.js Wed May 15 13:53:48 2019 +0200 +++ b/client/src/components/map/layers.js Wed May 15 14:15:45 2019 +0200 @@ -14,6 +14,7 @@ import { equalTo } from "ol/format/filter"; import { HTTP } from "@/lib/http"; import styles from "./styles"; +import store from "@/store/index"; const buildVectorLoader = ( featureRequestOptions, @@ -51,7 +52,7 @@ JSON.stringify(response.data) ); if (featurePostProcessor) { - features.map(f => featurePostProcessor(f)); + features.map(f => featurePostProcessor(f, store)); } vectorSource.addFeatures(features); }) @@ -213,8 +214,9 @@ geometryName: "area" }, source, - f => { - if (f.getId() === this.selectedStretchId) { + true, + (f, store) => { + if (f.getId() === store.state.imports.selectedStretchId) { f.set("highlighted", true); } return f;