# HG changeset patch # User Fadi Abbud # Date 1550593224 -3600 # Node ID 7dd7371702b9b04fc25dd6d1f2db1e014343d1cb # Parent 918091d1df72f9aad47039b3852c1366b9f3a6f6 client: use the name of constants instead of strings diff -r 918091d1df72 -r 7dd7371702b9 client/src/store/fairway.js --- 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