# HG changeset patch # User Markus Kottlaender # Date 1558704767 -7200 # Node ID 870812d8f2479e0284ec824d20b0ee5fe0fc39e0 # Parent ca395be6202327df210641979be74cad785d9dfb client: spuc05: implemented new data format (csv) for diagrams on map diff -r ca395be62023 -r 870812d8f247 client/src/components/map/layers.js --- a/client/src/components/map/layers.js Fri May 24 14:24:24 2019 +0200 +++ b/client/src/components/map/layers.js Fri May 24 15:32:47 2019 +0200 @@ -485,7 +485,7 @@ } else { let date = new Date(); data = await store.dispatch( - "fairwayavailability/loadAvailableFairwayDepthLNWL", + "fairwayavailability/loadAvailableFairwayDepthLNWLForMap", { feature: f, from: date.toISOString().split("T")[0], diff -r ca395be62023 -r 870812d8f247 client/src/components/map/styles.js --- a/client/src/components/map/styles.js Fri May 24 14:24:24 2019 +0200 +++ b/client/src/components/map/styles.js Fri May 24 15:32:47 2019 +0200 @@ -194,20 +194,10 @@ resolution > 15 ) { let data = feature.get("fa_data"); - let lnwlHeight = - (80 / 100) * data.ldc.find(d => d.hasOwnProperty("from")).percent; - let belowThresholdHeight = - (80 / 100) * - data.afd.find(d => d.hasOwnProperty("to") && !d.hasOwnProperty("from")) - .percent; - let betweenThresholdHeight = - (80 / 100) * - data.afd.find(d => d.hasOwnProperty("to") && d.hasOwnProperty("from")) - .percent; - let aboveThresholdHeight = - (80 / 100) * - data.afd.find(d => !d.hasOwnProperty("to") && d.hasOwnProperty("from")) - .percent; + let lnwlHeight = (80 / 100) * data.ldc; + let belowThresholdHeight = (80 / 100) * data.below; + let betweenThresholdHeight = (80 / 100) * data.between; + let aboveThresholdHeight = (80 / 100) * data.above; let frame = ``; let lnwl = `