mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:27:07 +00:00
Make map API calls silent.
Otherwise we get spurious 404s and such.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user