Mercurial > gemma
changeset 1041:7e3c620a5639
rounding cut coordinates
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Thu, 25 Oct 2018 07:01:18 +0200 |
parents | aac42dacb503 |
children | f786f6024ad1 |
files | client/src/map/Maplayer.vue |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/map/Maplayer.vue Wed Oct 24 18:05:15 2018 +0200 +++ b/client/src/map/Maplayer.vue Thu Oct 25 07:01:18 2018 +0200 @@ -173,7 +173,9 @@ console.log("requesting profile for", this.selectedMorph); const inputLineString = event.feature.getGeometry().clone(); inputLineString.transform("EPSG:3857", "EPSG:4326"); - const [start, end] = inputLineString.getCoordinates(); + const [start, end] = inputLineString + .getCoordinates() + .map(coords => coords.map(coord => parseFloat(coord.toFixed(8)))); this.$store.commit("fairwayprofile/setStartPoint", start); this.$store.commit("fairwayprofile/setEndPoint", end); const profileLine = new LineString([start, end]);