Skip to content

Commit

Permalink
Always set the tile url.
Browse files Browse the repository at this point in the history
This avoids false positives in the url check in CacheWrite::cache when the CacheRead control is also active.
  • Loading branch information
ahocevar committed Mar 9, 2012
1 parent 5f48e54 commit 3d8a916
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/OpenLayers/Control/CacheRead.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit 3d8a916

Please sign in to comment.