From 3d8a9168f09da950fd5c889663b18f51025514a5 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 9 Mar 2012 19:07:54 +0100 Subject: [PATCH] Always set the tile url. This avoids false positives in the url check in CacheWrite::cache when the CacheRead control is also active. --- lib/OpenLayers/Control/CacheRead.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/OpenLayers/Control/CacheRead.js b/lib/OpenLayers/Control/CacheRead.js index 554a6aee3c..6f44c7bbab 100644 --- a/lib/OpenLayers/Control/CacheRead.js +++ b/lib/OpenLayers/Control/CacheRead.js @@ -113,10 +113,9 @@ OpenLayers.Control.CacheRead = OpenLayers.Class(OpenLayers.Control, { var tile = evt.tile, dataURI = window.localStorage.getItem("olCache_" + tile.url); if (dataURI) { + tile.url = dataURI; if (evt.type === "tileerror") { tile.setImgSrc(dataURI); - } else { - tile.url = dataURI; } } }