comparison client/src/components/map/Map.vue @ 5288:48bef30cdb72

Client: limit displaying of error popup to only pdf-export mode(ECDIS layer)
author Fadi Abbud <fadi.abbud@intevation.de>
date Fri, 03 Jul 2020 15:37:42 +0200
parents 03b8fe8467de
children 661af6353d3b
comparison
equal deleted inserted replaced
5287:3ec58a8c42f5 5288:48bef30cdb72
66 "syncedView", 66 "syncedView",
67 "ongoingRefresh" 67 "ongoingRefresh"
68 ]), 68 ]),
69 ...mapState("bottlenecks", ["selectedSurvey"]), 69 ...mapState("bottlenecks", ["selectedSurvey"]),
70 ...mapState("fairwayprofile", ["additionalSurvey"]), 70 ...mapState("fairwayprofile", ["additionalSurvey"]),
71 ...mapState("application", ["paneSetup", "paneRotate", "config"]), 71 ...mapState("application", [
72 "paneSetup",
73 "paneRotate",
74 "config",
75 "ongoingPDFExport"
76 ]),
72 ...mapState("imports", ["selectedStretchId", "selectedSectionId"]), 77 ...mapState("imports", ["selectedStretchId", "selectedSectionId"]),
73 layers() { 78 layers() {
74 return layerFactory(this.paneId); 79 return layerFactory(this.paneId);
75 }, 80 },
76 hasActiveInteractions() { 81 hasActiveInteractions() {
286 url: this.config.ecdis_wms_url, 291 url: this.config.ecdis_wms_url,
287 crossOrigin: "anonymous", 292 crossOrigin: "anonymous",
288 params: JSON.parse(this.config.ecdis_wms_params) 293 params: JSON.parse(this.config.ecdis_wms_params)
289 }); 294 });
290 source.on("imageloaderror", error => { 295 source.on("imageloaderror", error => {
291 console.log(error); 296 if (this.ongoingPDFExport) {
292 displayError({ 297 console.log(error);
293 title: this.$gettext("Loading Error"), 298 displayError({
294 message: this.$gettext( 299 title: this.$gettext("Loading Error"),
295 "The ECDIS chart could not be loaded completely, the map might be corrupted. Please retry later" 300 message: this.$gettext(
296 ), 301 "The ECDIS chart could not be loaded completely, the map might be corrupted. Please retry later"
297 options: { 302 ),
298 timeout: 0, 303 options: {
299 showProgressBar: false, 304 timeout: 0,
300 closeOnClick: true, 305 showProgressBar: false,
301 pauseOnHover: true, 306 closeOnClick: true,
302 oneAtTime: true, 307 pauseOnHover: true,
303 bodyMaxLength: 1024 308 bodyMaxLength: 1024
304 } 309 }
305 }); 310 });
311 }
306 }); 312 });
313
307 this.layers.get("INLANDECDIS").setSource(source); 314 this.layers.get("INLANDECDIS").setSource(source);
308 this.map = new Map({ 315 this.map = new Map({
309 layers: this.layers.config, 316 layers: this.layers.config,
310 target: "map-" + this.paneId, 317 target: "map-" + this.paneId,
311 controls: [], 318 controls: [],