various tweaks to how IITC requests data tiles from the servers

- change TILES_PER_REQUEST to 25, instead of 10 - to match current stock intel site
- modify the zoom level faking IITC does. it still makes good use of IITC's caching, but no longer switches to a zoom level with larger tiles. recent changes to tile parameters for L8 portals on the standard intel site suggests that it's nicer to the servers to request more, but smaller, tiles, than fewer but larger ones
- restored the 'show less portals when zoomed out' plugin. however, this works differently now. rather than faking the zoom level for larger tiles, it now effectively applies the portal level filter used by the standard site. just as many requests as stock, but much smaller responses with fewer portals, so faster rendering
This commit is contained in:
Jon Atkins
2014-10-24 00:59:31 +01:00
parent 66cc162e38
commit caff9340d3
3 changed files with 80 additions and 56 deletions

View File

@ -1,12 +1,12 @@
// ==UserScript==
// @id iitc-plugin-show-less-portals@jonatkins
// @name IITC plugin: Show less portals when zoomed out
// @category Deleted
// @version 0.2.0.@@DATETIMEVERSION@@
// @category Tweaks
// @version 0.3.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] IITC now defaults to showing fewer portals when zoomed out, making this plugin unnecessary.
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Vastly reduce the detail level when zoomed out to level 11 or less (L4+ portals), to significantly reduce data usage when viewing large areas.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
@ -14,3 +14,24 @@
// @grant none
// ==/UserScript==
@@PLUGINSTART@@
// PLUGIN START ////////////////////////////////////////////////////////
// use own namespace for plugin
window.plugin.showLessPortalsZoomedOut = function() {};
window.plugin.showLessPortalsZoomedOut.setup = function() {
// NOTE: the logic required is closely tied to the IITC+stock map detail level code - so the logic is moved there now
// and just enabled by this flag
window.CONFIG_ZOOM_SHOW_LESS_PORTALS_ZOOMED_OUT=true;
};
var setup = window.plugin.showLessPortalsZoomedOut.setup;
// PLUGIN END //////////////////////////////////////////////////////////
@@PLUGINEND@@