From 3e3039b7fdfd3de85dab76659d1a4502f1328b99 Mon Sep 17 00:00:00 2001 From: Philipp Schaefer Date: Sat, 4 Jan 2014 13:30:01 +0100 Subject: [PATCH 1/7] updated faq --- website/page/faq.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/website/page/faq.php b/website/page/faq.php index e6594cd8..9049201c 100644 --- a/website/page/faq.php +++ b/website/page/faq.php @@ -175,6 +175,23 @@ Note: END ), +'offline-map-tiles' => Array ( "IITC Mobile: Is it possible to prefetch map tiles to reduce data traffic?", +<<<'END' +In fact, you don't have to care about tile caching. On mobile networks, IITCm +downloads tiles only if it's really needed. Tiles are updated only when +connected to WiFi. If you still want to prefetch tiles, go on reading: + +END +), + 'debug-data-tiles' => Array ( "What do the colours mean in 'DEBUG Data Tiles'", <<<'END' The data from the Niantic server is download in square tiles. Sometimes requests fail. The colours show this status From ba72b63a2c06f30c7e1bb02c23b4ff1a4920cbf0 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 13 Jan 2014 20:13:18 +0000 Subject: [PATCH 2/7] website: news post for new release --- website/page/home.php | 11 +++++++++++ website/page/news.php | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/website/page/home.php b/website/page/home.php index 118bff1d..4d87937c 100644 --- a/website/page/home.php +++ b/website/page/home.php @@ -13,6 +13,17 @@ offers many more features. It is available for

Latest news

+

13th January 2014

+

+A new IITC release, 0.16.2 and IITC Mobile 0.10.2 have been released. These are needed to work with a change to the +standard intel site. +

+

+Additionally, the 'Compute AP Statistics' plugin has been brought back, the 'blank map' base layer has a new black option +to go with the white, and the 'Yandex' base map has had some bug fixes. Also, IITC Mobile features some changes to +the 'show my location' feature. You may need to turn this option on again for it to work. +

+

21st December 2013

Just in time for the holidays, another IITC update. IITC 0.16.1 and IITC Mobile 0.10.1 have just been released. diff --git a/website/page/news.php b/website/page/news.php index 23c1b48b..14164d50 100644 --- a/website/page/news.php +++ b/website/page/news.php @@ -1,5 +1,17 @@

News

+

13th January 2014

+

+A new IITC release, 0.16.2 and IITC Mobile 0.10.2 have been released. These are needed to work with a change to the +standard intel site. +

+

+Additionally, the 'Compute AP Statistics' plugin has been brought back, the 'blank map' base layer has a new black option +to go with the white, and the 'Yandex' base map has had some bug fixes. Also, IITC Mobile features some changes to +the 'show my location' feature. You may need to turn this option on again for it to work. +

+ +

21st December 2013

Just in time for the holidays, another IITC update. IITC 0.16.1 and IITC Mobile 0.10.1 have just been released. From 1bd5b50fdde97258e74363645614b1b3de87cb89 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 13 Jan 2014 20:34:44 +0000 Subject: [PATCH 3/7] bump version --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 1e9bf0d6..24744885 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.16.2.@@DATETIMEVERSION@@ +// @version 0.16.3.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ From 08dc8ca46480fda809d9e4db00a28084cdfe831c Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 13 Jan 2014 20:37:52 +0000 Subject: [PATCH 4/7] add 'TODO' comment --- code/map_data_request.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/map_data_request.js b/code/map_data_request.js index 00b8682b..6949e477 100644 --- a/code/map_data_request.js +++ b/code/map_data_request.js @@ -262,6 +262,10 @@ window.MapDataRequest.prototype.refresh = function() { } } +//TODO: the stock intel site now orders tiles based on distance from the centre of the map, to get relevent +//data loaded sooner. IITC should do the same... + + this.setStatus ('loading', undefined, -1); // technically a request hasn't actually finished - however, displayed portal data has been refreshed From 05cd342051605f57ad742ec6345f4913cde222d4 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 13 Jan 2014 22:25:18 +0000 Subject: [PATCH 5/7] sort the queued tiles by the distance from the centre of the screen this mirrors the changes to the stock intel site as of 2014-01-13 (and is something i'd been considering before they did this) --- code/map_data_request.js | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/code/map_data_request.js b/code/map_data_request.js index 6949e477..4b37b308 100644 --- a/code/map_data_request.js +++ b/code/map_data_request.js @@ -177,6 +177,9 @@ window.MapDataRequest.prototype.refresh = function() { this.tileErrorCount = {}; // the 'set' of requested tile QKs + // NOTE: javascript does not guarantee any order to properties of an object. however, in all major implementations + // properties retain the order they are added in. IITC uses this to control the tile fetch order. if browsers change + // then fetch order isn't optimal, but it won't break things. this.queuedTiles = {}; @@ -228,6 +231,11 @@ window.MapDataRequest.prototype.refresh = function() { this.failedTileCount = 0; this.staleTileCount = 0; + var tilesToFetchDistance = {}; + + // map center point - for fetching center tiles first + var mapCenterPoint = map.project(map.getCenter(), zoom); + // y goes from left to right for (var y = y1; y <= y2; y++) { // x goes from bottom to top(?) @@ -255,15 +263,35 @@ window.MapDataRequest.prototype.refresh = function() { this.render.processTileData (old_data); } - // queue a request - this.queuedTiles[tile_id] = tile_id; + // tile needed. calculate the distance from the centre of the screen, to optimise the load order + + var latCenter = (latNorth+latSouth)/2; + var lngCenter = (lngEast+lngWest)/2; + var tileLatLng = L.latLng(latCenter,lngCenter); + + var tilePoint = map.project(tileLatLng, zoom); + + var delta = mapCenterPoint.subtract(tilePoint); + var distanceSquared = delta.x*delta.x + delta.y*delta.y; + + tilesToFetchDistance[tile_id] = distanceSquared; this.requestedTileCount += 1; } } } -//TODO: the stock intel site now orders tiles based on distance from the centre of the map, to get relevent -//data loaded sooner. IITC should do the same... + // re-order the tile list by distance from the centre of the screen. this should load more relevant data first + var tilesToFetch = Object.keys(tilesToFetchDistance); + tilesToFetch.sort(function(a,b) { + return tilesToFetchDistance[a]-tilesToFetchDistance[b]; + }); + + for (var i in tilesToFetch) { + var qk = tilesToFetch[i]; + + this.queuedTiles[qk] = qk; + } + this.setStatus ('loading', undefined, -1); From 9113c09fa748998f437fdbe7544eb713279aab06 Mon Sep 17 00:00:00 2001 From: fkloft Date: Tue, 14 Jan 2014 08:55:32 +0100 Subject: [PATCH 6/7] Try to fix recent bug in IITCm --- mobile/src/com/cradle/iitc_mobile/Log.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mobile/src/com/cradle/iitc_mobile/Log.java b/mobile/src/com/cradle/iitc_mobile/Log.java index 5a232761..c16038bb 100644 --- a/mobile/src/com/cradle/iitc_mobile/Log.java +++ b/mobile/src/com/cradle/iitc_mobile/Log.java @@ -142,12 +142,16 @@ public final class Log { public static boolean log(ConsoleMessage message) { String msg = message.sourceId(); - Matcher matcher = URL_PATTERN.matcher(msg); - if (matcher.matches()) { - msg = "<" + matcher.group(1) + "/" + matcher.group(2) + ">"; + + if (msg == null || "".equals(msg)) { + msg = ""; + } else { + Matcher matcher = URL_PATTERN.matcher(msg); + if (matcher.matches()) { + msg = "<" + matcher.group(1) + "/" + matcher.group(2) + ">"; + } } - if ("".equals(msg)) msg = ""; msg += ":" + message.lineNumber() + ": " + message.message(); final Integer priority = CONSOLE_MAPPING.get(message.messageLevel()); From b85ce30904e4d4321196336415c361f3b07bee98 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Tue, 14 Jan 2014 10:43:55 +0000 Subject: [PATCH 7/7] bump mobile version in preperation for bugfix release --- mobile/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/AndroidManifest.xml b/mobile/AndroidManifest.xml index 0e7dade4..1834beb9 100644 --- a/mobile/AndroidManifest.xml +++ b/mobile/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="64" + android:versionName="0.10.3">