diff --git a/src/ol/source/vectortile.js b/src/ol/source/vectortile.js index 95f7e770df..e8a9283e83 100644 --- a/src/ol/source/vectortile.js +++ b/src/ol/source/vectortile.js @@ -96,6 +96,14 @@ ol.source.VectorTile.prototype.getOverlaps = function() { return this.overlaps_; }; +/** + * clear {@link ol.TileCache} and delete all source tiles + * @api + */ +ol.source.VectorTile.prototype.clear = function() { + this.tileCache.clear(); + this.sourceTiles_ = {}; +}; /** * @inheritDoc