From c32e6f2b380e0e97e0dfa4aece375789aff89e6a Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Fri, 25 Jul 2025 17:11:15 +0200 Subject: [PATCH] Make map API calls silent. Otherwise we get spurious 404s and such. --- lib/www/client/source/src/views/Map.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/www/client/source/src/views/Map.vue b/lib/www/client/source/src/views/Map.vue index d9be90d..3ae72e5 100644 --- a/lib/www/client/source/src/views/Map.vue +++ b/lib/www/client/source/src/views/Map.vue @@ -429,7 +429,7 @@ export default { methods: { async fitProjectBounds () { - const res = await this.api([`/project/${this.$route.params.project}/gis`]); + const res = await this.api([`/project/${this.$route.params.project}/gis`], {}, null, {silent:true}); const bbox = new L.GeoJSON(res); map.fitBounds(bbox.getBounds()); }, @@ -437,7 +437,7 @@ export default { getEvents (ffn = i => true) { return async (success, error) => { const url = `/project/${this.$route.params.project}/event`; - const data = await this.api([url, {headers: {"Accept": "application/geo+json"}}]); + const data = await this.api([url, {headers: {"Accept": "application/geo+json"}}, {}, null, {silent:true}]); if (data) { const colour = (feature) => { @@ -501,7 +501,7 @@ export default { // Firing all refresh events asynchronously, which is OK provided // we don't have hundreds of layers to be refreshed. - this.api([url, init]) + this.api([url, init, null, {silent:true}]) .then( (layer) => { if (!layer) { return; @@ -681,7 +681,7 @@ export default { async getLabelDefinitions () { const url = `/project/${this.$route.params.project}/label`; - this.labels = await this.api([url]) || []; + this.labels = await this.api([url, {}, null, {silent:true}]) || []; }, @@ -808,7 +808,7 @@ export default { async fetchUserLayers () { const url = `/project/${this.$route.params.project}/gis/layer`; - const userLayers = await this.api([url]) || []; + const userLayers = await this.api([url, {}, null, {silent:true}]) || []; this.removeUserLayers(); this.addUserLayers(userLayers);