Mercurial > gemma
changeset 5280:03b8fe8467de
client: display toast message due to loading layer error ("INLANDECDIS")
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Fri, 12 Jun 2020 15:34:22 +0200 |
parents | a17c2a0b8e44 |
children | cda87159b431 |
files | client/src/components/map/Map.vue |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/map/Map.vue Thu Jun 11 15:50:11 2020 +0200 +++ b/client/src/components/map/Map.vue Fri Jun 12 15:34:22 2020 +0200 @@ -287,6 +287,23 @@ crossOrigin: "anonymous", params: JSON.parse(this.config.ecdis_wms_params) }); + source.on("imageloaderror", error => { + console.log(error); + displayError({ + title: this.$gettext("Loading Error"), + message: this.$gettext( + "The ECDIS chart could not be loaded completely, the map might be corrupted. Please retry later" + ), + options: { + timeout: 0, + showProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + oneAtTime: true, + bodyMaxLength: 1024 + } + }); + }); this.layers.get("INLANDECDIS").setSource(source); this.map = new Map({ layers: this.layers.config,