Mercurial > gemma
changeset 2339:7dd7371702b9
client: use the name of constants instead of strings
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Tue, 19 Feb 2019 17:20:24 +0100 |
parents | 918091d1df72 |
children | 236da7c20eac |
files | client/src/store/fairway.js |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/store/fairway.js Tue Feb 19 17:17:23 2019 +0100 +++ b/client/src/store/fairway.js Tue Feb 19 17:20:24 2019 +0100 @@ -20,6 +20,7 @@ import { getLength } from "ol/sphere.js"; import { displayError } from "../lib/errors.js"; import { featureToFairwayCoordinates } from "../lib/geo.js"; +import { LAYERS } from "@/store/map.js"; const DEMOLEVEL = 149.345; @@ -203,7 +204,7 @@ .then(() => { rootState.map.cutTool.setActive(false); const los3 = rootGetters["map/getLayerByName"]( - "LOS 3 Fairway Dimensions" + LAYERS.FAIRWAYDIMENSIONSLOS3 ); los3.data.getSource().forEachFeatureIntersectingExtent( profileLine @@ -226,7 +227,7 @@ } ); const los2 = rootGetters["map/getLayerByName"]( - "LOS 2 Fairway Dimensions" + LAYERS.FAIRWAYDIMENSIONSLOS2 ); los2.data.getSource().forEachFeatureIntersectingExtent( profileLine @@ -249,7 +250,7 @@ } ); const los1 = rootGetters["map/getLayerByName"]( - "LOS 1 Fairway Dimensions" + LAYERS.FAIRWAYDIMENSIONSLOS1 ); los1.data.getSource().forEachFeatureIntersectingExtent( profileLine