Mercurial > gemma
comparison client/src/store/bottlenecks.js @ 3407:7ea54c3b3fd6
afd: breaks for bottlenecks
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 23 May 2019 13:37:35 +0200 |
parents | 5914d615f703 |
children | 3138836bf840 |
comparison
equal
deleted
inserted
replaced
3406:1ba669cbbee6 | 3407:7ea54c3b3fd6 |
---|---|
31 export default { | 31 export default { |
32 init, | 32 init, |
33 namespaced: true, | 33 namespaced: true, |
34 state: init(), | 34 state: init(), |
35 getters: { | 35 getters: { |
36 limitingFactorsPerBottleneck: state => { | |
37 if (state.bottlenecks.length === 0) return {}; | |
38 return state.bottlenecks.reduce((o, n) => { | |
39 o[n.properties.objnam] = n.properties.limiting; | |
40 return o; | |
41 }, {}); | |
42 }, | |
36 orderedBottlenecks: state => { | 43 orderedBottlenecks: state => { |
37 let groupedBottlenecks = {}, | 44 let groupedBottlenecks = {}, |
38 orderedGroups = {}; | 45 orderedGroups = {}; |
39 | 46 |
40 // group bottlenecks by cc | 47 // group bottlenecks by cc |
165 var bottleneckFeatureCollectionRequest = new WFS().writeGetFeature({ | 172 var bottleneckFeatureCollectionRequest = new WFS().writeGetFeature({ |
166 srsName: "EPSG:4326", | 173 srsName: "EPSG:4326", |
167 featureNS: "gemma", | 174 featureNS: "gemma", |
168 featurePrefix: "gemma", | 175 featurePrefix: "gemma", |
169 featureTypes: ["bottlenecks_geoserver"], | 176 featureTypes: ["bottlenecks_geoserver"], |
170 outputFormat: "application/json" | 177 outputFormat: "application/json", |
178 propertyNames: ["objnam", "limiting", "reference_water_levels"] | |
171 }); | 179 }); |
172 HTTP.post( | 180 HTTP.post( |
173 "/internal/wfs", | 181 "/internal/wfs", |
174 new XMLSerializer().serializeToString( | 182 new XMLSerializer().serializeToString( |
175 bottleneckFeatureCollectionRequest | 183 bottleneckFeatureCollectionRequest |