re-do request bucket handling - instead of grouping up to four requests together, so large window sizes make more requests, group requests into max 4 blocks
I think this is closer to the stock intel site behaviour, and should vastly reduce requests, especially at high resolutions
This commit is contained in:
parent
5e4e8fee6b
commit
140c5c2cb9
@ -29,7 +29,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 = Math.floor(x / 2) + "" + Math.floor(y / 2);
|
||||
var bucket = (x % 2) + ":" + (y % 2);
|
||||
if (!tiles[bucket])
|
||||
tiles[bucket] = [];
|
||||
tiles[bucket].push(generateBoundsParams(
|
||||
@ -44,6 +44,7 @@ window.requestData = function() {
|
||||
|
||||
// Reset previous result of Portal Render Limit handler
|
||||
portalRenderLimit.init();
|
||||
|
||||
// finally send ajax requests
|
||||
$.each(tiles, function(ind, tls) {
|
||||
data = { zoom: z };
|
||||
|
Loading…
x
Reference in New Issue
Block a user