From 04d2e60d75176ddc377417c77aff39cfce86ca66 Mon Sep 17 00:00:00 2001 From: hastarin Date: Thu, 23 May 2013 20:32:52 +1000 Subject: [PATCH 1/5] This is a version of the multi window patch minus Android Studio changes. Proguard changes are excluded since there is no config in the master branch --- mobile/AndroidManifest.xml | 62 +++++++++++++++++++++++++++--------- mobile/res/values/dimens.xml | 4 +++ 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/mobile/AndroidManifest.xml b/mobile/AndroidManifest.xml index c40ad029..894d0d6f 100644 --- a/mobile/AndroidManifest.xml +++ b/mobile/AndroidManifest.xml @@ -1,18 +1,18 @@ + package="com.cradle.iitc_mobile" + android:versionCode="21" + android:versionName="0.4.0"> + android:targetSdkVersion="17"/> - - - - - + + + + + + android:configChanges="orientation|keyboard|keyboardHidden|screenSize"> - - + + + + + - - + + + + android:configChanges="orientation|keyboard|keyboardHidden|screenSize"> + + + + + + + + + + diff --git a/mobile/res/values/dimens.xml b/mobile/res/values/dimens.xml index a6dd1403..4fb5f825 100644 --- a/mobile/res/values/dimens.xml +++ b/mobile/res/values/dimens.xml @@ -3,5 +3,9 @@ 16dp 16dp + 640dip + 400dip + 400dip + 200dip \ No newline at end of file From d61c5cc752320836a7227461c0eace14f86f0bba Mon Sep 17 00:00:00 2001 From: Philipp Schaefer Date: Thu, 23 May 2013 13:18:01 +0200 Subject: [PATCH 2/5] bumped version number --- mobile/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/AndroidManifest.xml b/mobile/AndroidManifest.xml index 894d0d6f..f9fc9e4d 100644 --- a/mobile/AndroidManifest.xml +++ b/mobile/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="22" + android:versionName="0.4.1"> Date: Thu, 23 May 2013 13:44:00 +0200 Subject: [PATCH 3/5] fixed typo in API --- mobile/src/com/cradle/iitc_mobile/IITC_DeviceAccountLogin.java | 2 +- mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_DeviceAccountLogin.java b/mobile/src/com/cradle/iitc_mobile/IITC_DeviceAccountLogin.java index ba0ce3d1..db9511ff 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_DeviceAccountLogin.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_DeviceAccountLogin.java @@ -153,7 +153,7 @@ public class IITC_DeviceAccountLogin implements AccountManagerCallback { if (result != null) { // authentication succeded, we can load the given url, which will redirect back to the intel map mWebView.loadUrl(result); - mActivity.loginSucceded(); + mActivity.loginSucceeded(); } else { onLoginFailed(); } diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java index 2af11b89..88604777 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java @@ -399,7 +399,7 @@ public class IITC_Mobile extends Activity { /** * called after successful login */ - public void loginSucceded() { + public void loginSucceeded() { // garbage collection mLogin = null; } From 9e540bb4570d8dc657ed418da054335d47e39cf6 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Thu, 23 May 2013 18:07:59 +0100 Subject: [PATCH 4/5] add a template plugin for the old cloudmade.com maps. users need to register to get their own API key for this --- plugins/basemap-cloudmade.user.js | 96 +++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100755 plugins/basemap-cloudmade.user.js diff --git a/plugins/basemap-cloudmade.user.js b/plugins/basemap-cloudmade.user.js new file mode 100755 index 00000000..41470b89 --- /dev/null +++ b/plugins/basemap-cloudmade.user.js @@ -0,0 +1,96 @@ +//****************************** +//****************************** +//******** INSTRUCTIONS ******** +//****************************** +//****************************** + +// 1. Go to the www.cloudmade.com website and register an account +// 2. Get an API Key +// 3. Edit the clode below, replace YOUR_API_KEY with the API key from CloudMade.com +// 4. Reload the page +// optional: browse their map styles, add/modify any you like to the cmStyles list + +//****************************** +//****************************** +//****************************** + + +// ==UserScript== +// @id iitc-plugin-cloudmade-maps +// @name IITC plugin: CloudMade.com maps +// @version 0.0.1 +// @namespace https://github.com/jonatkins/ingress-intel-total-conversion +// @description TEMPLATE PLUGIN - add back the CloudMade.com map layers. YOU WILL NEED TO EDIT THIS PLUGIN BEFORE IT WILL RUN +// @include https://www.ingress.com/intel* +// @include http://www.ingress.com/intel* +// @match https://www.ingress.com/intel* +// @match http://www.ingress.com/intel* +// ==/UserScript== + +function wrapper() { +// ensure plugin framework is there, even if iitc is not yet loaded +if(typeof window.plugin !== 'function') window.plugin = function() {}; + + +// PLUGIN START //////////////////////////////////////////////////////// + +window.plugin.mapTileCloudMade = function() {}; + +window.plugin.mapTileCloudMade.setup = function() { + //********************************** + //********************************** + //**** CloudMade settings start **** + //********************************** + //********************************** + + //set this to your API key - get an API key by registering at www.cloudmade.com + //e.g. var cmApiKey = '8ee2a50541944fb9bcedded5165f09d9'; + var cmApiKey = 'YOUR_API_KEY'; + + //the list of styles you'd like to see + var cmStyles = { + '999': "Midnight", + '22677': "Minimal", + '78603': "Armageddon", + }; + + //********************************** + //********************************** + //**** CloudMade settings end **** + //********************************** + //********************************** + + + if(cmApiKey=='YOUR_API_KEY') { + dialog({title: 'CloudMade.com map plugin', text: 'The CloudMade.com plugin needs manual configuration. Edit the plugin code to do this.'}); + return; + } + + var osmAttribution = 'Map data © OpenStreetMap contributors'; + var cmOpt = {attribution: osmAttribution+', Imagery © CloudMade', maxZoom: 18, apikey: cmApiKey}; + + $.each(cmStyles, function(key,value) { + cmOpt['style'] = key; + var cmMap = new L.TileLayer('http://{s}.tile.cloudmade.com/{apikey}/{style}/256/{z}/{x}/{y}.png', cmOpt); + layerChooser.addBaseLayer(cmMap, 'CloudMade '+value); + }); + +}; + +var setup = window.plugin.mapTileCloudMade.setup; + +// PLUGIN END ////////////////////////////////////////////////////////// + +if(window.iitcLoaded && typeof setup === 'function') { + setup(); +} else { + if(window.bootPlugins) + window.bootPlugins.push(setup); + else + window.bootPlugins = [setup]; +} +} // wrapper end +// inject code into site context +var script = document.createElement('script'); +script.appendChild(document.createTextNode('('+ wrapper +')();')); +(document.body || document.head || document.documentElement).appendChild(script); From f4027881b4d22287f83083a574810bfda645bae7 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Thu, 23 May 2013 18:12:39 +0100 Subject: [PATCH 5/5] add some disclaimers to the CloudMade map plugin comments --- plugins/basemap-cloudmade.user.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/basemap-cloudmade.user.js b/plugins/basemap-cloudmade.user.js index 41470b89..b6857696 100755 --- a/plugins/basemap-cloudmade.user.js +++ b/plugins/basemap-cloudmade.user.js @@ -10,6 +10,12 @@ // 4. Reload the page // optional: browse their map styles, add/modify any you like to the cmStyles list +// You take your own responsibility for any API key you register and use. Please read +// any relevant terms and conditions. At the time of writing, Cloudmade offer a reasonable +// number of free requests, which should be more than enough for personal use. You could +// probably share a key with a group of people without issues, but it is your responsibility +// to remain within any terms and usage limits. + //****************************** //****************************** //******************************