Mercurial > gemma
diff client/src/store/fairwayavailability.js @ 3457:870812d8f247
client: spuc05: implemented new data format (csv) for diagrams on map
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 24 May 2019 15:32:47 +0200 |
parents | 41349a9c8ce9 |
children | b43cf476d791 |
line wrap: on
line diff
--- a/client/src/store/fairwayavailability.js Fri May 24 14:24:24 2019 +0200 +++ b/client/src/store/fairwayavailability.js Fri May 24 15:32:47 2019 +0200 @@ -360,6 +360,24 @@ // transformAFDLNWL commit("setFwLNWLData", data); }); + }, + loadAvailableFairwayDepthLNWLForMap: ({ dispatch }, options) => { + return dispatch("loadAvailableFairwayDepthLNWL", options).then( + response => { + let data = response.split("\n").filter(d => d); + data.shift(); // remove header line + data = data.map(d => { + let columns = d.split(","); + return { + ldc: columns[2], + below: columns[3], + between: columns[4], + above: columns[5] + }; + }); + return data[0]; + } + ); } } };