Add 'rendercomplete' event

This commit is contained in:
ahocevar
2018-08-21 17:29:10 +02:00
parent 3f98094d9d
commit 1baa8be269
11 changed files with 128 additions and 60 deletions

View File

@@ -871,6 +871,7 @@ class VectorSource extends Source {
loadFeatures(extent, resolution, projection) {
const loadedExtentsRtree = this.loadedExtentsRtree_;
const extentsToLoad = this.strategy_(extent, resolution);
this.loading = false;
for (let i = 0, ii = extentsToLoad.length; i < ii; ++i) {
const extentToLoad = extentsToLoad[i];
const alreadyLoaded = loadedExtentsRtree.forEachInExtent(extentToLoad,
@@ -884,6 +885,7 @@ class VectorSource extends Source {
if (!alreadyLoaded) {
this.loader_.call(this, extentToLoad, resolution, projection);
loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});
this.loading = true;
}
}
}