Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Catherine Taylor 2013-08-21 12:42:45 +01:00
commit 1b0bf7b0a1
13 changed files with 43 additions and 22 deletions

View File

@ -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);
}

View File

@ -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)));
}

View File

@ -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);

View File

@ -121,7 +121,14 @@ window.startRefreshTimeout = function(override) {
} else {
window.requests._quickRefreshPending = false;
t = REFRESH*1000;
var adj = ZOOM_LEVEL_ADJ * (18 - window.map.getZoom());
// new getThinnedEntitiesV4 involves a LOT more requests when zoomed out above a data level of 13
// so, to give the refresh a chance to complete (and also reduce load on niantic servers), boost the refresh interval
// in this case
// (TODO: complete rewrite of refresh+request handling. don't start timer until complete, and retry error=TIMEOUT requests)
if (getPortalDataZoom() <=12 ) t = t*4;
var adj = ZOOM_LEVEL_ADJ * (18 - getPortalDataZoom());
if(adj > 0) t += adj*1000;
}
var next = new Date(new Date().getTime() + t).toLocaleTimeString();

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @id ingress-intel-total-conversion@jonatkins
// @name IITC: Ingress intel map total conversion
// @version 0.13.2.@@DATETIMEVERSION@@
// @version 0.13.3.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@ -117,8 +117,8 @@ L_PREFER_CANVAS = false;
// CONFIG OPTIONS ////////////////////////////////////////////////////
window.REFRESH = 60; // refresh view every 30s (base time)
window.ZOOM_LEVEL_ADJ = 5; // add 5 seconds per zoom level
window.ON_MOVE_REFRESH = 1.25; //refresh time to use after a movement event
window.MINIMUM_OVERRIDE_REFRESH = 5; //limit on refresh time since previous refresh, limiting repeated move refresh rate
window.ON_MOVE_REFRESH = 2.5; //refresh time to use after a movement event
window.MINIMUM_OVERRIDE_REFRESH = 10; //limit on refresh time since previous refresh, limiting repeated move refresh rate
window.REFRESH_GAME_SCORE = 15*60; // refresh game score every 15 minutes
window.MAX_IDLE_TIME = 4*60; // stop updating map after 4min idling
window.PRECACHE_PLAYER_NAMES_ZOOM = 17; // zoom level to start pre-resolving player names

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cradle.iitc_mobile"
android:versionCode="36"
android:versionName="0.5.4.1">
android:versionCode="37"
android:versionName="0.5.4.2">
<uses-sdk
android:minSdkVersion="14"

View File

@ -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);
}

View File

@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show keys in keys plugin on map.
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the manually entered key counts from keys plugin on the map.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*

View File

@ -6,7 +6,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Store portal keys. Install the 'Sync' plugin to sync the keys between clients.
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow manual entry of key counts for each portal. Use 'keys-on-map' to show the numbers on the map, and 'sync' to share between multiple browsers or desktop/mobile.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*

View File

@ -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;
}
}

View File

@ -2,7 +2,7 @@
// @id iitc-plugin-show-more-portals@jonatkins
// @name IITC plugin: Show more portals
// @category Tweaks
// @version 0.1.1.@@DATETIMEVERSION@@
// @version 0.1.2.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@ -35,7 +35,9 @@ window.plugin.showMorePortals.setup = function() {
// yes, it is possible to increase this beyond "+1" - however, that will end up producing a rediculous number
// of requests to the Niantic servers, giving many request failed errors/tile timeouts
// (every increase by one requests four times as many data tiles)
var z = mapZoom + 1;
// UPDATE: due to the new smaller tiles used when zoomed out further (getThinnedEntitiesV4), it gets silly
// doing this when zoomed out. so only boost when zoomed in
var z = mapZoom > 12 ? mapZoom + 1 : mapZoom;
// limiting the mazimum zoom level for data retrieval reduces the number of requests at high zoom levels
// (as all portal data is retrieved at z=17, why retrieve multiple z=18 tiles when fewer z=17 would do?)

View File

@ -13,6 +13,12 @@ offers many more features. It is available for
<h3>Latest news</h3>
<h4>16th August 2013</h4>
<p>
IITC 0.13.3 and IITC Mobile 0.5.4.2 have been released. This is another critical update required to work
with another change Niantic have made to the standard intel site.
</p>
<h4>14th August 2013</h4>
<p>
IITC 0.13.2 and IITC Mobile 0.5.4.1 have been released. This is a critical release required to work with

View File

@ -1,5 +1,11 @@
<h2>News</h2>
<h4>16th August 2013</h4>
<p>
IITC 0.13.3 and IITC Mobile 0.5.4.2 have been released. This is another critical update required to work
with another change Niantic have made to the standard intel site.
</p>
<h4>14th August 2013</h4>
<p>
IITC 0.13.2 and IITC Mobile 0.5.4.1 have been released. This is a critical release required to work with