RemoveFromLoadedExtent to remove extent to the list of loaded extent in case of server error/restriction.

This commit is contained in:
geonux
2015-07-06 14:43:05 +02:00
committed by Andreas Hocevar
parent 2e2d8ea3d7
commit 5641430590

View File

@@ -762,6 +762,27 @@ ol.source.Vector.prototype.loadFeatures = function(
};
/**
* Remove the current extent from the list of loaded extent.
* @param {ol.Extent} extent Extent.
* @api
*/
ol.source.Vector.prototype.removeFromLoadedExtent = function(
extent) {
var loadedExtentsRtree = this.loadedExtentsRtree_;
var obj;
loadedExtentsRtree.forEachInExtent(extent, function(object) {
if (ol.extent.equals(object.extent, extent)) {
obj = object;
return true;
}
});
if (obj) {
loadedExtentsRtree.remove(obj);
}
};
/**
* Remove a single feature from the source. If you want to remove all features
* at once, use the {@link ol.source.Vector#clear source.clear()} method