Merge branch 'master' of linz:/srv/git/git-kairo
authorRobert Kaiser <kairo@kairo.at>
Tue, 11 Sep 2012 15:25:50 +0000 (17:25 +0200)
committerRobert Kaiser <kairo@kairo.at>
Tue, 11 Sep 2012 15:25:50 +0000 (17:25 +0200)
1  2 
js/map.js

diff --combined js/map.js
index 5cd194e59268d17dda3175e399cdc55e97efa7fc,48b1128ac66cfee0d651977b763dab9fab98da49..f27b0191c51efa38c6108e7cae000a3d56d22a75
+++ b/js/map.js
@@@ -124,6 -124,7 +124,7 @@@ function initMap() 
    gCanvas.addEventListener("touchcancel", mapEvHandler, false);
    gCanvas.addEventListener("touchleave", mapEvHandler, false);
  
+   // XXX deprecated? see https://groups.google.com/forum/?fromgroups#!topic/mozilla.dev.planning/kuhrORubaRY[1-25]
    gCanvas.addEventListener("DOMMouseScroll", mapEvHandler, false);
    gCanvas.addEventListener("mousewheel", mapEvHandler, false);
  
@@@ -183,6 -184,8 +184,8 @@@ function setMapStyle() 
    if (mapSel.selectedIndex >= 0 && gActiveMap != mapSel.value) {
      gActiveMap = mapSel.value;
      gTiles = {};
+     document.getElementById("copyright").innerHTML =
+         gMapStyles[gActiveMap].copyright;
      drawMap();
    }
  }
@@@ -262,7 -265,7 +265,7 @@@ function drawMap() 
    // Go through all the tiles we want.
    // If any of them aren't loaded or being loaded, do so.
    for (var x = Math.floor(xMin / size); x < Math.ceil(xMax / size); x++) {
 -    for (var y = Math.floor(yMin / size); y < Math.ceil(yMax / size); y++) {
 +    for (var y = Math.floor(yMin / size); y < Math.ceil(yMax / size); y++) { // slow script warnings on the tablet appear here!
        var xoff = (x * size - xMin) / gZoomFactor;
        var yoff = (y * size - yMin) / gZoomFactor;
        var tileKey = encodeIndex(x, y, gPos.z);