call painting tiles before issuing the command to cache them
authorRobert Kaiser <robert@widebook.box.kairo.at>
Sun, 30 Dec 2012 20:51:55 +0000 (21:51 +0100)
committerRobert Kaiser <robert@widebook.box.kairo.at>
Sun, 30 Dec 2012 20:51:55 +0000 (21:51 +0100)
js/map.js

index 9ffc81c3f3c99bd90c701384d179a7042b9d0587..14b692187b95388931c5674d24fa28a4a84d061f 100644 (file)
--- a/js/map.js
+++ b/js/map.js
@@ -678,8 +678,8 @@ var gTileService = {
       XHR.addEventListener("load", function () {
         if (XHR.status === 200) {
           var blob = XHR.response;
-          gTileService.setDBCache(dbkey, {image: blob, timestamp: Date.now()});
           aCallback(blob, aStyle, aCoords);
+          gTileService.setDBCache(dbkey, {image: blob, timestamp: Date.now()});
         }
       }, false);
       XHR.send();