From 3abca8720c3191f8cd4ee8f416677b91b5281e6d Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 10 Jun 2013 04:44:57 +0100 Subject: [PATCH] minor tweak to bucket allocation for data tiles. may help reduce response sizes and load on niantic servers --- code/map_data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/map_data.js b/code/map_data.js index 4c26642f..d34887b9 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -33,7 +33,7 @@ window.requestData = function() { for (var x = x1; x <= x2; x++) { for (var y = y1; y <= y2; y++) { var tile_id = pointToTileId(z, x, y); - var bucket = (x % 2) + ":" + (y % 2); + var bucket = (Math.floor(x/2) % 2) + ":" + (Math.floor(y/2) % 2); if (!tiles[bucket]) { //create empty bucket tiles[bucket] = [];