forked from edward/owl-map
Track which map bounds are already done
This commit is contained in:
parent
74f82ecbb0
commit
b18162fb1a
|
@ -1473,6 +1473,13 @@ export default {
|
|||
}
|
||||
},
|
||||
load_wikidata_items(bounds) {
|
||||
bounds ||= this.map.getBounds();
|
||||
var this_update = this.map_update_number += 1;
|
||||
|
||||
for(const b of this.bounds_done) {
|
||||
if (b.contains(bounds)) return; // already done
|
||||
}
|
||||
|
||||
this.load_button_pressed = true;
|
||||
this.wikidata_loaded = false;
|
||||
this.osm_loaded = false;
|
||||
|
@ -1607,6 +1614,8 @@ export default {
|
|||
if (!item.wikidata) missing_qids.push(qid);
|
||||
}
|
||||
|
||||
this.bounds_done.push(this.map.getBounds());
|
||||
|
||||
if (missing_qids.length == 0) {
|
||||
this.update_wikidata();
|
||||
this.check_for_missing_done = true;
|
||||
|
|
Loading…
Reference in a new issue