diff --git a/code/map_data.js b/code/map_data.js index b2a60a47..1216dae0 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -216,12 +216,12 @@ window.requestData = function() { return 0; }); - data = { zoom: z }; + data = { }; data.boundsParamsList = tls; // keep a list of tile_ids with each request. in the case of a server error, we can try and use cached tiles if available var tile_ids = [] $.each(tls,function(i,req) { tile_ids.push(req.qk); }); - window.requests.add(window.postAjax('getThinnedEntitiesV3', data, function(data, textStatus, jqXHR) { window.handleDataResponse(data,false,tile_ids); }, function() { window.handleFailedRequest(tile_ids); })); + window.requests.add(window.postAjax('getThinnedEntitiesV4', data, function(data, textStatus, jqXHR) { window.handleDataResponse(data,false,tile_ids); }, function() { window.handleFailedRequest(tile_ids); })); }); // process the requests from the cache @@ -255,7 +255,7 @@ window.handleFailedRequest = function(tile_ids) { handleDataResponse(cachedData, true); } - if(requests.isLastRequest('getThinnedEntitiesV3')) { + if(requests.isLastRequest('getThinnedEntitiesV4')) { var leftOverPortals = portalRenderLimit.mergeLowLevelPortals(null); handlePortalsRender(leftOverPortals); } diff --git a/code/map_data_calc_tools.js b/code/map_data_calc_tools.js index 33e444cb..8f845c5e 100644 --- a/code/map_data_calc_tools.js +++ b/code/map_data_calc_tools.js @@ -10,20 +10,20 @@ // http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames window.lngToTile = function(lng, zoom) { - return Math.floor((lng + 180) / 360 * Math.pow(2, zoom)); + return Math.floor((lng + 180) / 360 * Math.pow(2, (zoom>12)?zoom:(zoom+2))); } window.latToTile = function(lat, zoom) { return Math.floor((1 - Math.log(Math.tan(lat * Math.PI / 180) + - 1 / Math.cos(lat * Math.PI / 180)) / Math.PI) / 2 * Math.pow(2, zoom)); + 1 / Math.cos(lat * Math.PI / 180)) / Math.PI) / 2 * Math.pow(2, (zoom>12)?zoom:(zoom+2))); } window.tileToLng = function(x, zoom) { - return x / Math.pow(2, zoom) * 360 - 180; + return x / Math.pow(2, (zoom>12)?zoom:(zoom+2)) * 360 - 180; } window.tileToLat = function(y, zoom) { - var n = Math.PI - 2 * Math.PI * y / Math.pow(2, zoom); + var n = Math.PI - 2 * Math.PI * y / Math.pow(2, (zoom>12)?zoom:(zoom+2)); return 180 / Math.PI * Math.atan(0.5 * (Math.exp(n) - Math.exp(-n))); } diff --git a/code/portal_render_limit.js b/code/portal_render_limit.js index 299f28cf..cd1f4cb5 100644 --- a/code/portal_render_limit.js +++ b/code/portal_render_limit.js @@ -98,7 +98,7 @@ window.portalRenderLimit.splitOrMergeLowLevelPortals = function(originPortals) { portalRenderLimit.resetCounting(); portalRenderLimit.countingPortals(originPortals); - var resultPortals = requests.isLastRequest('getThinnedEntitiesV3') + var resultPortals = requests.isLastRequest('getThinnedEntitiesV4') ? portalRenderLimit.mergeLowLevelPortals(originPortals) : portalRenderLimit.splitLowLevelPortals(originPortals); diff --git a/plugins/ap-list.user.js b/plugins/ap-list.user.js index a3b44411..c10fe9fb 100644 --- a/plugins/ap-list.user.js +++ b/plugins/ap-list.user.js @@ -2,7 +2,7 @@ // @id iitc-plugin-ap-list@xelio // @name IITC plugin: AP List // @category Info -// @version 0.5.4.@@DATETIMEVERSION@@ +// @version 0.5.5.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -54,7 +54,7 @@ window.plugin.apList.animTimeout; // ENTRY POINT /////////////////////////////////////////////////////////////////// window.plugin.apList.handleUpdate = function() { - if(!requests.isLastRequest('getThinnedEntitiesV3')) return; + if(!requests.isLastRequest('getThinnedEntitiesV4')) return; plugin.apList.updateSortedPortals(); plugin.apList.updatePortalTable(plugin.apList.displaySide); } diff --git a/plugins/show-linked-portals.user.js b/plugins/show-linked-portals.user.js index a69f7a90..75ef6ba8 100644 --- a/plugins/show-linked-portals.user.js +++ b/plugins/show-linked-portals.user.js @@ -2,7 +2,7 @@ // @id iitc-plugin-show-linked-portals@fstopienski // @name IITC plugin: Show linked portals // @category Portal Info -// @version 0.0.6.@@DATETIMEVERSION@@ +// @version 0.0.7.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -29,7 +29,7 @@ window.plugin.showLinkedPortal = function () { }; window.plugin.showLinkedPortal.handleUpdate = function () { - if (!requests.isLastRequest('getThinnedEntitiesV3')) { + if (!requests.isLastRequest('getThinnedEntitiesV4')) { return; } }