Skip to content

Commit

Permalink
added gridLoadData
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperknot committed Feb 12, 2016
1 parent 68d52de commit 3c87804
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions debug/map/tile-debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@
mad = [40.40, -3.7];

var map = L.map('map', {
zoomSnap: 0,
// zoomSnap: 0,
// zoomAnimation: false,
fadeAnimation: false
}).setView(dc, 10);

var gridCounts = {},
positronCounts = {};
positronCounts = {},
gridLoadData = {};

resetCounter();

Expand All @@ -165,7 +167,12 @@

grid.createTile = function (coords) {
var tile = L.DomUtil.create('div', 'grid');
tile.innerHTML = [coords.x, coords.y, coords.z].join(', ');
var indexStr = [coords.x, coords.y, coords.z].join(', ');
if (!(indexStr in gridLoadData)) {
gridLoadData[indexStr] = 0;
}
tile.innerHTML = ++gridLoadData[indexStr];
tile.style.backgroundColor = 'rgba(255,0,0,' + gridLoadData[indexStr] / 10 + ')';
return tile;
};

Expand Down

0 comments on commit 3c87804

Please sign in to comment.