Mercurial > gemma
comparison client/src/map/Maplayer.vue @ 1041:7e3c620a5639
rounding cut coordinates
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Thu, 25 Oct 2018 07:01:18 +0200 |
parents | 1fdeb9404afb |
children | 740679d6682f |
comparison
equal
deleted
inserted
replaced
1040:aac42dacb503 | 1041:7e3c620a5639 |
---|---|
171 // with the bottleneck area's polygon before trying the server request | 171 // with the bottleneck area's polygon before trying the server request |
172 if (this.selectedMorph) { | 172 if (this.selectedMorph) { |
173 console.log("requesting profile for", this.selectedMorph); | 173 console.log("requesting profile for", this.selectedMorph); |
174 const inputLineString = event.feature.getGeometry().clone(); | 174 const inputLineString = event.feature.getGeometry().clone(); |
175 inputLineString.transform("EPSG:3857", "EPSG:4326"); | 175 inputLineString.transform("EPSG:3857", "EPSG:4326"); |
176 const [start, end] = inputLineString.getCoordinates(); | 176 const [start, end] = inputLineString |
177 .getCoordinates() | |
178 .map(coords => coords.map(coord => parseFloat(coord.toFixed(8)))); | |
177 this.$store.commit("fairwayprofile/setStartPoint", start); | 179 this.$store.commit("fairwayprofile/setStartPoint", start); |
178 this.$store.commit("fairwayprofile/setEndPoint", end); | 180 this.$store.commit("fairwayprofile/setEndPoint", end); |
179 const profileLine = new LineString([start, end]); | 181 const profileLine = new LineString([start, end]); |
180 this.$store | 182 this.$store |
181 .dispatch("fairwayprofile/loadProfile", this.selectedMorph.date_info) | 183 .dispatch("fairwayprofile/loadProfile", this.selectedMorph.date_info) |