comparison client/src/components/fairway/BottleneckDialogue.vue @ 4525:9887061df57b

Use CQL filter to load the current survey difference.
author Raimund Renkert <raimund@renkert.org>
date Mon, 07 Oct 2019 14:22:35 +0200
parents 245e6215361e
children b3261790a9b2
comparison
equal deleted inserted replaced
4524:7cca4aa9a04a 4525:9887061df57b
378 "previousCuts", 378 "previousCuts",
379 "startPoint", 379 "startPoint",
380 "endPoint", 380 "endPoint",
381 "profileLoading", 381 "profileLoading",
382 "differencesLoading", 382 "differencesLoading",
383 "currentDifference",
383 "waterLevels", 384 "waterLevels",
384 "currentProfile" 385 "currentProfile"
385 ]), 386 ]),
386 ...mapGetters("map", ["openLayersMap"]), 387 ...mapGetters("map", ["openLayersMap"]),
387 ...mapGetters("bottlenecks", ["orderedBottlenecks"]), 388 ...mapGetters("bottlenecks", ["orderedBottlenecks"]),
570 headers: { 571 headers: {
571 "X-Gemma-Auth": localStorage.getItem("token") 572 "X-Gemma-Auth": localStorage.getItem("token")
572 } 573 }
573 } 574 }
574 ) 575 )
575 .then() 576 .then(response => {
577 this.$store.commit(
578 "fairwayprofile/setCurrentDifference",
579 response.data.id
580 );
581 if (this.openLayersMap(COMPARESURVEYS.compare.id)) {
582 this.openLayersMap(COMPARESURVEYS.compare.id)
583 .getLayer("DIFFERENCES")
584 .getSource()
585 .updateParams({
586 LAYERS: "sounding_differences",
587 VERSION: "1.1.1",
588 TILED: true,
589 CQL_FILTER: "id=" + response.data.id
590 });
591 this.openLayersMap(COMPARESURVEYS.compare.id)
592 .getLayer("DIFFERENCES")
593 .getSource()
594 .refresh();
595 }
596 })
576 .catch(error => { 597 .catch(error => {
577 let status, data, message; 598 let status, data, message;
578 if (error.response) { 599 if (error.response) {
579 status = error.response.status; 600 status = error.response.status;
580 data = error.response.data; 601 data = error.response.data;