diff --git a/src/ol/source/vectortile.js b/src/ol/source/vectortile.js index cfd8eb1079..6402ee31c1 100644 --- a/src/ol/source/vectortile.js +++ b/src/ol/source/vectortile.js @@ -101,6 +101,13 @@ ol.source.VectorTile.prototype.getOverlaps = function() { return this.overlaps_; }; +/** + * clear {@link ol.TileCache} and delete all source tiles + */ +ol.source.VectorTile.prototype.clear = function() { + this.tileCache.clear(); + this.sourceTiles_ = {}; +}; /** * @inheritDoc