Prune all except for the most recent z on URL change

This commit is contained in:
Tim Schaub
2017-10-07 10:29:40 -06:00
parent a4e0c54200
commit 97745c50af
3 changed files with 60 additions and 0 deletions
+1
View File
@@ -155,6 +155,7 @@ ol.source.UrlTile.prototype.setTileLoadFunction = function(tileLoadFunction) {
*/
ol.source.UrlTile.prototype.setTileUrlFunction = function(tileUrlFunction, opt_key) {
this.tileUrlFunction = tileUrlFunction;
this.tileCache.pruneExceptNewestZ();
if (typeof opt_key !== 'undefined') {
this.setKey(opt_key);
} else {