From 57b446fa0a8fd479452d9d6f3cd938ad15703456 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 21 Feb 2013 16:14:15 +0100 Subject: [PATCH] Implement useTile for image tile sources with caches --- src/ol/source/imagetilesource.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ol/source/imagetilesource.js b/src/ol/source/imagetilesource.js index 4a59b1bcff..d47b9215e5 100644 --- a/src/ol/source/imagetilesource.js +++ b/src/ol/source/imagetilesource.js @@ -109,3 +109,14 @@ ol.source.ImageTileSource.prototype.getTile = function(tileCoord) { ol.source.ImageTileSource.prototype.getTileCoordUrl = function(tileCoord) { return this.tileUrlFunction(tileCoord); }; + + +/** + * @inheritDoc + */ +ol.source.ImageTileSource.prototype.useTile = function(tileCoord) { + var key = tileCoord.toString(); + if (this.tileCache_.containsKey(key)) { + this.tileCache_.get(key); + } +};