Mercurial > gemma
diff client/src/components/toolbar/Polygontool.vue @ 3006:44493664d40e
client: refactored layers config
Layers are not stored in the vuex store anymore but instead they are served from a factory function, so that
different maps can haved individual layer objects
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Thu, 11 Apr 2019 11:44:11 +0200 |
parents | b74ebeb2bdc8 |
children | c71373594719 |
line wrap: on
line diff
--- a/client/src/components/toolbar/Polygontool.vue Thu Apr 11 10:11:59 2019 +0200 +++ b/client/src/components/toolbar/Polygontool.vue Thu Apr 11 11:44:11 2019 +0200 @@ -30,7 +30,7 @@ export default { name: "polygontool", computed: { - ...mapState("map", ["layers", "lineTool", "polygonTool", "cutTool"]), + ...mapState("map", ["openLayersMap", "lineTool", "polygonTool", "cutTool"]), label() { return this.$gettext("Measure Area"); } @@ -41,7 +41,10 @@ this.lineTool.setActive(false); this.cutTool.setActive(false); this.$store.commit("map/setCurrentMeasurement", null); - this.layers.DRAWTOOL.getSource().clear(); + this.openLayersMap + .getLayer("DRAWTOOL") + .getSource() + .clear(); } } };