From 1d51b72785f4d14ca0e26fd1d1f69c25f9deb2e7 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Wed, 29 May 2013 11:18:25 -0700 Subject: [PATCH] Fixed blendTile()-related blurriness issue We were setting drawer.updateAgain to the result of each blendTile(), which meant it was keeping only the last result. Instead we should have been only setting it to true if blendTile returned true, but never setting it to false. Fixed. --- src/drawer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/drawer.js b/src/drawer.js index 72c932d5..833d1fe6 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -709,8 +709,7 @@ function updateTile( drawer, drawLevel, haveDrawn, x, y, level, levelOpacity, le ); if ( tile.loaded ) { - - drawer.updateAgain = blendTile( + var needsUpdate = blendTile( drawer, tile, x, y, @@ -718,6 +717,10 @@ function updateTile( drawer, drawLevel, haveDrawn, x, y, level, levelOpacity, le levelOpacity, currentTime ); + + if ( needsUpdate ) { + drawer.updateAgain = true; + } } else if ( tile.loading ) { // the tile is already in the download queue // thanks josh1093 for finally translating this typo