diff --git a/code/map_data_calc_tools.js b/code/map_data_calc_tools.js index f1718e2b..34636500 100755 --- a/code/map_data_calc_tools.js +++ b/code/map_data_calc_tools.js @@ -41,27 +41,6 @@ window.setupDataTileParams = function() { window.TILE_PARAMS.TILES_PER_EDGE = DEFAULT_ZOOM_TO_TILES_PER_EDGE; } - // disable SHOW_MORE_PORTALS if it would be unfriendly to the servers (i.e. result in more requests) - // needs to be fired a bit later, after plugins have been initialised - setTimeout(function(){ - if (window.CONFIG_ZOOM_SHOW_MORE_PORTALS) { - if (window.TILE_PARAMS.TILES_PER_EDGE[17] > window.TILE_PARAMS.TILES_PER_EDGE[15]) { - var edgeScale = window.TILE_PARAMS.TILES_PER_EDGE[17]/window.TILE_PARAMS.TILES_PER_EDGE[15]; - var mapScale = edgeScale*edgeScale; - - dialog({ - title: 'Show more portals plugin disabled', - width: 400, - text: 'The "show-more-portals" plugin has been disabled.\n\n' - +'Niantic have changed the intel site so that zoom level 17 (all portals) now needs '+mapScale+' times more requests than level 15 (L1+ portals), so fetching at the wrong zoom level will be unfriendly to the servers\n\n' - +'Don\'t like this? Ask Niantic to change the standard intel site, then IITC can match and all would benifit.' - }); - - window.CONFIG_ZOOM_SHOW_MORE_PORTALS=false; - } - } - }, 1); - } @@ -100,11 +79,20 @@ window.getDataZoomForMapZoom = function(zoom) { // firstly, some of IITCs zoom levels, depending on base map layer, can be higher than stock. limit zoom level // (stock site max zoom may vary depending on google maps detail in the area - 20 or 21 max is common) - if (zoom > 20) { - zoom = 20; + if (zoom > 21) { + zoom = 21; + } + + if (window.CONFIG_ZOOM_SHOW_MORE_PORTALS) { + // slightly unfriendly to the servers, requesting more, but smaller, tiles, for the 'unclaimed' level of detail + // however, server load issues are all related to the map area in view, with no real issues related to detail level + // therefore, I believel we can get away with these smaller tiles for one or two further zoom levels without issues + + if (zoom == 16) { + zoom = 17; + } } - var origTileParams = getMapZoomTileParameters(zoom); if (!window.CONFIG_ZOOM_DEFAULT_DETAIL_LEVEL) { @@ -112,6 +100,8 @@ window.getDataZoomForMapZoom = function(zoom) { // to avoid impacting server load, we keep ourselves restricted to a zoom level with the sane numbre // of tilesPerEdge and portal levels visible + var origTileParams = getMapZoomTileParameters(zoom); + while (zoom > MIN_ZOOM) { var newTileParams = getMapZoomTileParameters(zoom-1); if (newTileParams.tilesPerEdge != origTileParams.tilesPerEdge || newTileParams.level != origTileParams.level) { @@ -126,15 +116,6 @@ window.getDataZoomForMapZoom = function(zoom) { } - if (window.CONFIG_ZOOM_SHOW_MORE_PORTALS) { - // this is, in theory, slightly 'unfriendly' to the servers. in practice, this isn't the case - and it can even be nicer - // as it vastly improves cacheing in IITC and also reduces the amount of panning/zooming a user would do - if (zoom >= 15 && zoom <= 16) { - //L1+ and closer zooms. the 'all portals' zoom uses the same tile size, so it's no harm to request things at that zoom level - zoom = 17; - } - } - return zoom; } diff --git a/main.js b/main.js index 8340074d..1af57009 100644 --- a/main.js +++ b/main.js @@ -1,7 +1,7 @@ // ==UserScript== // @id ingress-intel-total-conversion@jonatkins // @name IITC: Ingress intel map total conversion -// @version 0.22.3.@@DATETIMEVERSION@@ +// @version 0.22.4.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ diff --git a/mobile/AndroidManifest.xml b/mobile/AndroidManifest.xml index 09c63aa4..aea6794d 100644 --- a/mobile/AndroidManifest.xml +++ b/mobile/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="97" + android:versionName="0.22.4"> Latest news -

4th April 2015

+

8th May 2015

-IITC 0.22.2 has been released. This is a critical update needed to fix portal loading at some zoom levels. -

- -

20th March 2015

-

-IITC 0.22.1 has been released. This is a critical update needed to fix COMM after a recent Niantic site update. -

-

-Other changes +IITC 0.22.3 has been released. Changes include

-

27th Febuary 2015

-

-IITC 0.22.0 has been released. This is a critical update needed to fix loading of portal details after the recent -Niantic site update. -

-

-Major update to IITC's search system. Multiple search results are listed and specific results selected. -Visible portals are also searched, numerical lat/lng search added, and some plugins also integrate with the new -search feature: player-tracker (player name search), regions (region name search), bookmarks, -

-

-

-...plus other minor bug fixes and optimisations. -

- Older news diff --git a/website/page/news.php b/website/page/news.php index 41469ee1..9a5abe11 100644 --- a/website/page/news.php +++ b/website/page/news.php @@ -1,5 +1,19 @@

News

+

8th May 2015

+

+IITC 0.22.3 has been released. Changes include +

+ +

4th April 2015

IITC 0.22.2 has been released. This is a critical update needed to fix portal loading at some zoom levels.