code: function scanLine(x0, x1, y) {
        var z = c0.zoom,
            z0 = 2 - tileLevel,
            z1 = 4 + tileLevel;
  
        for (var x = x0; x < x1; x++) {
          var t = cache.load({column: x, row: y, zoom: z}, projection);
          if (!t.ready && !(t.key in newLocks)) {
            t.proxyRefs = {};
            var c, full, proxy;
  
            // downsample high-resolution tiles
            for (var dz = 1; dz <= z0; dz++) {
              full = true;
              for (var dy = 0, k = 1 << dz; dy <= k; dy++) {
                for (var dx = 0; dx <= k; dx++) {
                  proxy = cache.peek(c = {
                    column: (x << dz) + dx,
                    row: (y << dz) + dy,
                    zoom: z + dz
                  });
                  if (proxy && proxy.ready) {
                    newLocks[proxy.key] = cache.load(c);
                    proxy.proxyCount++;
                    t.proxyRefs[proxy.key] = proxy;
                  } else {
                    full = false;
                  }
                }
              }
              if (full) break;
            }
  
            // upsample low-resolution tiles
            if (!full) {
              for (var dz = 1; dz <= z1; dz++) {
                proxy = cache.peek(c = {
                  column: x >> dz,
                  row: y >> dz,
                  zoom: z - dz
                });
                if (proxy && proxy.ready) {
                  newLocks[proxy.key] = cache.load(c);
                  proxy.proxyCount++;
                  t.proxyRefs[proxy.key] = proxy;
                  break;
                }
              }
            }
          }
          newLocks[t.key] = t;
        }
      }
docs: scan-line conversion