From 33c541e926388eb6449fead718e1b9f4ac89fb78 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 24 Jan 2013 18:06:54 -0500 Subject: [PATCH] Fix upTile loading --- js/id/renderer/background.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/js/id/renderer/background.js b/js/id/renderer/background.js index 8e872aa52..6476e7a28 100644 --- a/js/id/renderer/background.js +++ b/js/id/renderer/background.js @@ -65,19 +65,15 @@ iD.Background = function() { tiles.forEach(function(d) { - // if this tile has already failed, do - // not request it - if (cache[d] !== false) d.push(source(d)); - - // if this tile has failed, try to request its tile above - if (cache[d] === false && + if (cache[d] === true) { + d.push(source(d)); + } else if (cache[d] === false && cache[atZoom(d, -1)] !== false && !ups[atZoom(d, -1)]) { ups[atZoom(d, -1)] = true; tiles.push(atZoom(d, -1)); - // if this tile has not finished, req the one above } else if (cache[d] === undefined && lookUp(d)) { @@ -87,8 +83,6 @@ iD.Background = function() { tiles.push(upTile); } - // if this tile has not yet completed, try keeping the - // tiles below it } else if (cache[d] === undefined || cache[d] === false) { upZoom(d, 1).forEach(function(u) {