RemoveFromLoadedExtent to remove extent to the list of loaded extent in case of server error/restriction.
This commit is contained in:
@@ -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
|
* 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
|
* at once, use the {@link ol.source.Vector#clear source.clear()} method
|
||||||
|
|||||||
Reference in New Issue
Block a user