From d4488a8dfd92a7119ec69700bb8abf3ee6f84791 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 21 Jul 2021 21:38:57 +0200 Subject: [PATCH] add padding when requesting nearby OSM candidates --- frontend/App.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/App.vue b/frontend/App.vue index f1533fe..8f88e8b 100644 --- a/frontend/App.vue +++ b/frontend/App.vue @@ -431,7 +431,7 @@ item type counts | item detail | item tags | - nearby OSM candidates + nearby OSM candidates
@@ -663,6 +663,7 @@ export default { mode: undefined, current_hit: undefined, recent_search: undefined, + pad_amount: 1.0, }; }, computed: { @@ -845,6 +846,9 @@ export default { bounds_param() { return 'bounds=' + this.map.getBounds().toBBoxString(); }, + pad_bounds_param() { + return 'bounds=' + this.map.getBounds().pad(this.pad_amount).toBBoxString(); + }, close_edit_list() { this.view_edits = false; if (this.upload_state != 'done') return; @@ -1133,7 +1137,7 @@ export default { }); var item_osm_candidates_url = `${this.api_base_url}/api/1/item/${qid}/candidates`; - var bounds = this.map.getBounds(); + var bounds = this.map.getBounds().pad(this.pad_amount); var params = { bounds: bounds.toBBoxString() }; axios.get(item_osm_candidates_url, { params: params }).then((response) => {