Mercurial > gemma
changeset 714:ebe6799623cb
client: improve preparation to request profile
* Add hardcoded examples for bottleneck and data properties, to complete
the GeoJSON towards the server.
* Simplify code.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Fri, 21 Sep 2018 13:23:32 +0200 |
parents | badbc0207418 |
children | 23b68cd4bed3 |
files | client/src/map/Maplayer.vue |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/map/Maplayer.vue Fri Sep 21 13:18:30 2018 +0200 +++ b/client/src/map/Maplayer.vue Fri Sep 21 13:23:32 2018 +0200 @@ -88,14 +88,17 @@ // prepare to send the first line seqment to the server as GeoJSON inputLineString.transform("EPSG:3857", "EPSG:4326"); var coords = inputLineString.getCoordinates(); - console.log(coords); if (coords.length >= 2) { var feature = new Feature({ geometry: new LineString([coords[0], coords[1]]), - geometryName: "geometry" + // FIXME: hardcoded bottleneck and survey date + bottleneck: "AT_Bottleneck_44", + date: "2017-11-20" }); - var g = new GeoJSON({geometryName:"geometry"}).writeFeature(feature); - console.log(g); + var gStr = new GeoJSON({ geometryName: "geometry" }).writeFeature( + feature + ); + console.log("Ready to start profile view with: ", gStr); } } },