Do not reload on clear(), but on refresh()

This commit is contained in:
ahocevar
2019-02-20 20:39:04 +01:00
parent a0ba8dd8c6
commit f40cbf2cac
2 changed files with 66 additions and 9 deletions

View File

@@ -498,7 +498,6 @@ class VectorSource extends Source {
if (this.featuresRtree_) {
this.featuresRtree_.clear();
}
this.loadedExtentsRtree_.clear();
this.nullGeometryFeatures_ = {};
const clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);
@@ -894,6 +893,15 @@ class VectorSource extends Source {
}
}
/**
* @inheritDoc
*/
refresh() {
this.clear(true);
this.loadedExtentsRtree_.clear();
super.refresh();
}
/**
* Remove an extent from the list of loaded extents.