changeset 3852:8acabf1f176f

client: refresh map layer sources whenever map component is mounted Because after saving configuration of morphology classbreaks changes should be visible immediately. Calling refreshLayers after saving although has no effect because the map is not shown and nothing is refreshed. So refreshing the layer sources everytime the map is mounted, seems legit, even though this results in visible loading and popping up of map features just by switching from admin to map context but I think that's ok and maybe soon everything will be merged into the map view anyway. Then refreshing the map layers can happend right after saving the config of classbreaks
author Markus Kottlaender <markus@intevation.de>
date Mon, 08 Jul 2019 17:43:48 +0200
parents 45eab8e9b580
children abc15a3182c7
files client/src/components/map/Map.vue
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/map/Map.vue	Mon Jul 08 17:26:03 2019 +0200
+++ b/client/src/components/map/Map.vue	Mon Jul 08 17:43:48 2019 +0200
@@ -284,6 +284,8 @@
                   })
                 });
                 this.layers.get("BOTTLENECKS").setStyle(newStyle);
+
+                this.$store.dispatch("map/refreshLayers");
               })
               .catch(error => {
                 console.log(error);