Merge git://github.com/jonatkins/ingress-intel-total-conversion into alignment-virus
This commit is contained in:
commit
34c58bae71
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
mobile/IngressIntelTC/bin
|
||||
build
|
||||
localbuildsettings.py
|
||||
*.pyc
|
||||
|
2
build.py
2
build.py
@ -225,7 +225,7 @@ if buildMobile:
|
||||
except:
|
||||
pass
|
||||
shutil.rmtree("mobile/assets/plugins")
|
||||
shutil.copytree(os.path.join(outDir,"plugins"), "mobile/assets/plugins", ignore=shutil.ignore_patterns('*.meta.js', 'force-https*', 'privacy-view*'))
|
||||
shutil.copytree(os.path.join(outDir,"plugins"), "mobile/assets/plugins", ignore=shutil.ignore_patterns('*.meta.js', 'force-https*', 'privacy-view*', 'speech-search*'))
|
||||
|
||||
|
||||
if buildMobile != 'copyonly':
|
||||
|
@ -125,13 +125,9 @@ window.setupMap = function() {
|
||||
//OpenStreetMap attribution - required by several of the layers
|
||||
osmAttribution = 'Map data © OpenStreetMap contributors';
|
||||
|
||||
//OpenStreetMap tiles - we shouldn't use these by default, or even an option - https://wiki.openstreetmap.org/wiki/Tile_usage_policy
|
||||
// "Heavy use (e.g. distributing an app that uses tiles from openstreetmap.org) is forbidden without prior permission from the System Administrators"
|
||||
//var osmOpt = {attribution: osmAttribution, maxZoom: 18, detectRetina: true};
|
||||
//var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', osmOpt);
|
||||
|
||||
//CloudMade layers - only 500,000 tiles/month in their free plan. nowhere near enough for IITC
|
||||
var cmOpt = {attribution: osmAttribution+', Imagery © CloudMade', maxZoom: 18, detectRetina: true};
|
||||
//var cmOpt = {attribution: osmAttribution+', Imagery © CloudMade', maxZoom: 18, detectRetina: true};
|
||||
//var cmMin = new L.TileLayer('http://{s}.tile.cloudmade.com/{your api key here}/22677/256/{z}/{x}/{y}.png', cmOpt);
|
||||
//var cmMid = new L.TileLayer('http://{s}.tile.cloudmade.com/{your api key here}/999/256/{z}/{x}/{y}.png', cmOpt);
|
||||
|
||||
|
@ -7,23 +7,28 @@ window.setupGeosearch = function() {
|
||||
|
||||
var search = $(this).val();
|
||||
|
||||
if ( window.search(search) ) return;
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
$('#geosearchwrapper img').click(function(){
|
||||
map.locate({setView : true, maxZoom: 13});
|
||||
});
|
||||
}
|
||||
|
||||
window.search = function(search) {
|
||||
if (!runHooks('geoSearch', search)) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
$.getJSON(NOMINATIM + encodeURIComponent(search), function(data) {
|
||||
if(!data || !data[0]) return;
|
||||
if(!data || !data[0]) return true;
|
||||
var b = data[0].boundingbox;
|
||||
if(!b) return;
|
||||
if(!b) return true;
|
||||
var southWest = new L.LatLng(b[0], b[2]),
|
||||
northEast = new L.LatLng(b[1], b[3]),
|
||||
bounds = new L.LatLngBounds(southWest, northEast);
|
||||
window.map.fitBounds(bounds);
|
||||
if(window.isSmartphone()) window.smartphone.mapButton.click();
|
||||
});
|
||||
e.preventDefault();
|
||||
});
|
||||
$('#geosearchwrapper img').click(function(){
|
||||
map.locate({setView : true, maxZoom: 13});;
|
||||
});
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ window.requestData = function() {
|
||||
for (var x = x1; x <= x2; x++) {
|
||||
for (var y = y1; y <= y2; y++) {
|
||||
var tile_id = pointToTileId(z, x, y);
|
||||
var bucket = Math.floor(x / 2) + "" + Math.floor(y / 2);
|
||||
var bucket = (x % 2) + ":" + (y % 2);
|
||||
if (!tiles[bucket])
|
||||
tiles[bucket] = [];
|
||||
tiles[bucket].push(generateBoundsParams(
|
||||
@ -44,6 +44,7 @@ window.requestData = function() {
|
||||
|
||||
// Reset previous result of Portal Render Limit handler
|
||||
portalRenderLimit.init();
|
||||
|
||||
// finally send ajax requests
|
||||
$.each(tiles, function(ind, tls) {
|
||||
data = { zoom: z };
|
||||
|
@ -111,7 +111,7 @@ window.getResonatorDetails = function(d) {
|
||||
// rotates clockwise. So, last one is 7 (southeast).
|
||||
window.renderResonatorDetails = function(slot, level, nrg, dist, nick) {
|
||||
if(level === 0) {
|
||||
var meter = '<span class="meter" title="octant:\t' + OCTANTS[slot] + '"></span>';
|
||||
var meter = '<span class="meter" title="octant:\t' + OCTANTS[slot] + ' ' + OCTANTS_ARROW[slot] + '"></span>';
|
||||
} else {
|
||||
var max = RESO_NRG[level];
|
||||
var fillGrade = nrg/max*100;
|
||||
@ -120,7 +120,7 @@ window.renderResonatorDetails = function(slot, level, nrg, dist, nick) {
|
||||
+ 'level:\t' + level + '\n'
|
||||
+ 'distance:\t' + dist + 'm\n'
|
||||
+ 'owner:\t' + nick + '\n'
|
||||
+ 'octant:\t' + OCTANTS[slot];
|
||||
+ 'octant:\t' + OCTANTS[slot] + ' ' + OCTANTS_ARROW[slot];
|
||||
|
||||
var style = 'width:'+fillGrade+'%; background:'+COLORS_LVL[level]+';';
|
||||
|
||||
|
1
main.js
1
main.js
@ -199,6 +199,7 @@ window.MAX_XM_PER_LEVEL = [0, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000];
|
||||
window.MIN_AP_FOR_LEVEL = [0, 10000, 30000, 70000, 150000, 300000, 600000, 1200000];
|
||||
window.HACK_RANGE = 40; // in meters, max. distance from portal to be able to access it
|
||||
window.OCTANTS = ['E', 'NE', 'N', 'NW', 'W', 'SW', 'S', 'SE'];
|
||||
window.OCTANTS_ARROW = ['→', '↗', '↑', '↖', '←', '↙', '↓', '↘'];
|
||||
window.DESTROY_RESONATOR = 75; //AP for destroying portal
|
||||
window.DESTROY_LINK = 187; //AP for destroying link
|
||||
window.DESTROY_FIELD = 750; //AP for destroying field
|
||||
|
37
mobile/.gitignore
vendored
37
mobile/.gitignore
vendored
@ -1,11 +1,34 @@
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
||||
bin/
|
||||
gen/
|
||||
libs/
|
||||
proguard-project.txt
|
||||
local.properties
|
||||
assets/total-conversion-build.user.js
|
||||
assets/user-location.user.js
|
||||
assets/plugins/
|
||||
|
||||
# built application files
|
||||
*.apk
|
||||
*.ap_
|
||||
|
||||
# files for the dex VM
|
||||
*.dex
|
||||
|
||||
# Java class files
|
||||
*.class
|
||||
|
||||
# generated files
|
||||
bin/
|
||||
gen/
|
||||
out/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
||||
# Eclipse project files
|
||||
.classpath
|
||||
.project
|
||||
|
||||
# IntelliJ IDEA user settings
|
||||
*.iws
|
||||
.idea/workspace.xml
|
||||
.idea/tasks.xml
|
||||
|
||||
# Proguard logs
|
||||
proguard_logs/
|
||||
|
1
mobile/.idea/.name
generated
Normal file
1
mobile/.idea/.name
generated
Normal file
@ -0,0 +1 @@
|
||||
IITC-Mobile
|
23
mobile/.idea/compiler.xml
generated
Normal file
23
mobile/.idea/compiler.xml
generated
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<resourceExtensions />
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="!?*.java" />
|
||||
<entry name="!?*.form" />
|
||||
<entry name="!?*.class" />
|
||||
<entry name="!?*.groovy" />
|
||||
<entry name="!?*.scala" />
|
||||
<entry name="!?*.flex" />
|
||||
<entry name="!?*.kt" />
|
||||
<entry name="!?*.clj" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="false">
|
||||
<processorPath useClasspath="true" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
|
5
mobile/.idea/copyright/profiles_settings.xml
generated
Normal file
5
mobile/.idea/copyright/profiles_settings.xml
generated
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="">
|
||||
<module2copyright />
|
||||
</settings>
|
||||
</component>
|
5
mobile/.idea/encodings.xml
generated
Normal file
5
mobile/.idea/encodings.xml
generated
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
|
||||
</project>
|
||||
|
10
mobile/.idea/misc.xml
generated
Normal file
10
mobile/.idea/misc.xml
generated
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="Android 4.2.2 Platform" project-jdk-type="Android SDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
|
9
mobile/.idea/modules.xml
generated
Normal file
9
mobile/.idea/modules.xml
generated
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/IITC-Mobile.iml" filepath="$PROJECT_DIR$/IITC-Mobile.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
|
5
mobile/.idea/scopes/scope_settings.xml
generated
Normal file
5
mobile/.idea/scopes/scope_settings.xml
generated
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="DependencyValidationManager">
|
||||
<state>
|
||||
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
|
||||
</state>
|
||||
</component>
|
8
mobile/.idea/vcs.xml
generated
Normal file
8
mobile/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="" />
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.cradle.iitc_mobile"
|
||||
android:versionCode="20"
|
||||
android:versionName="0.3.8" >
|
||||
android:versionCode="22"
|
||||
android:versionName="0.4.1">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="14"
|
||||
android:targetSdkVersion="17" />
|
||||
android:targetSdkVersion="17"/>
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@ -24,25 +24,77 @@
|
||||
android:name="com.cradle.iitc_mobile.IITC_Mobile"
|
||||
android:theme="@style/AppBaseTheme"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize" >
|
||||
android:launchMode="singleTop"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<!-- Used for Samsung Multi-Window support -->
|
||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
|
||||
<!-- Receives the search request. -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH"/>
|
||||
<!-- No category needed, because the Intent will specify this class component-->
|
||||
</intent-filter>
|
||||
|
||||
<!-- Handles the implicit intent to VIEW the www.ingress.com/intel URI -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:host="www.ingress.com" android:scheme="https" android:pathPrefix="/intel"></data>
|
||||
<data android:host="www.ingress.com" android:scheme="http" android:pathPrefix="/intel"></data>
|
||||
|
||||
<data
|
||||
android:host="www.ingress.com"
|
||||
android:scheme="https"
|
||||
android:pathPrefix="/intel"></data>
|
||||
<data
|
||||
android:host="www.ingress.com"
|
||||
android:scheme="http"
|
||||
android:pathPrefix="/intel"></data>
|
||||
</intent-filter>
|
||||
|
||||
<!-- Points to searchable meta data. -->
|
||||
<meta-data android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.cradle.iitc_mobile.IITC_Settings"
|
||||
android:theme="@style/AppBaseTheme"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize" >
|
||||
android:configChanges="orientation|keyboard|keyboardHidden|screenSize">
|
||||
</activity>
|
||||
|
||||
<!-- START Used for Samsung Multi-Window support -->
|
||||
<uses-library
|
||||
android:name="com.sec.android.app.multiwindow"
|
||||
android:required="false"/>
|
||||
|
||||
<meta-data
|
||||
android:name="com.sec.android.support.multiwindow"
|
||||
android:value="true"/>
|
||||
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
|
||||
android:resource="@dimen/app_defaultsize_w"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
|
||||
android:resource="@dimen/app_defaultsize_h"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W"
|
||||
android:resource="@dimen/app_minimumsize_w"/>
|
||||
<meta-data
|
||||
android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H"
|
||||
android:resource="@dimen/app_minimumsize_h"/>
|
||||
<!-- END Used for Samsung Multi-Window support -->
|
||||
|
||||
<!-- Points to searchable activity so the whole app can invoke search. -->
|
||||
<meta-data
|
||||
android:name="android.app.default_searchable"
|
||||
android:value="com.cradle.iitc_mobile.IITC_Mobile"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
25
mobile/IITC-Mobile.iml
Normal file
25
mobile/IITC-Mobile.iml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<notImportedProperties>
|
||||
<property>MANIFEST_FILE_PATH</property>
|
||||
<property>RESOURCES_DIR_PATH</property>
|
||||
<property>ASSETS_DIR_PATH</property>
|
||||
<property>NATIVE_LIBS_DIR_PATH</property>
|
||||
</notImportedProperties>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
35
mobile/build.gradle
Normal file
35
mobile/build.gradle
Normal file
@ -0,0 +1,35 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.4'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
dependencies {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 17
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = ['src']
|
||||
resources.srcDirs = ['src']
|
||||
aidl.srcDirs = ['src']
|
||||
renderscript.srcDirs = ['src']
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
}
|
||||
|
||||
instrumentTest.setRoot('tests')
|
||||
}
|
||||
}
|
25
mobile/mobile.iml
Normal file
25
mobile/mobile.iml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<notImportedProperties>
|
||||
<property>MANIFEST_FILE_PATH</property>
|
||||
<property>RESOURCES_DIR_PATH</property>
|
||||
<property>ASSETS_DIR_PATH</property>
|
||||
<property>NATIVE_LIBS_DIR_PATH</property>
|
||||
</notImportedProperties>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
16
mobile/proguard-project.txt
Normal file
16
mobile/proguard-project.txt
Normal file
@ -0,0 +1,16 @@
|
||||
# view res/xml/preferences.xml #generated:4
|
||||
-keep class com.cradle.iitc_mobile.IITC_AboutDialogPreference { <init>(...); }
|
||||
|
||||
# view AndroidManifest.xml #generated:23
|
||||
-keep class com.cradle.iitc_mobile.IITC_Mobile { <init>(...); }
|
||||
|
||||
# view AndroidManifest.xml #generated:56
|
||||
-keep class com.cradle.iitc_mobile.IITC_SearchableActivity { <init>(...); }
|
||||
|
||||
# view AndroidManifest.xml #generated:50
|
||||
-keep class com.cradle.iitc_mobile.IITC_Settings { <init>(...); }
|
||||
|
||||
# view res/layout/activity_main.xml #generated:6
|
||||
-keep class com.cradle.iitc_mobile.IITC_WebView { <init>(...); }
|
||||
|
||||
-keep class com.cradle.iitc_mobile.IITC_JSInterface { <init>(...); }
|
@ -1,5 +1,9 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item android:id="@+id/menu_search"
|
||||
android:title="@string/menu_search"
|
||||
android:icon="@drawable/action_search"
|
||||
android:showAsAction="ifRoom|collapseActionView"
|
||||
android:actionViewClass="android.widget.SearchView" />
|
||||
<item
|
||||
android:id="@+id/menu_map"
|
||||
android:icon="@drawable/location_map"
|
||||
@ -47,20 +51,20 @@
|
||||
</item>
|
||||
</menu>
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/locate"
|
||||
android:icon="@drawable/device_access_location_found"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/locate">
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/layer_chooser"
|
||||
android:icon="@drawable/ic_layer_chooser"
|
||||
android:orderInCategory="105"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/layer_chooser">
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/locate"
|
||||
android:icon="@drawable/device_access_location_found"
|
||||
android:orderInCategory="105"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/locate">
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/reload_button"
|
||||
android:icon="@drawable/navigation_refresh"
|
||||
|
@ -3,5 +3,9 @@
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="app_defaultsize_w">640dip</dimen>
|
||||
<dimen name="app_defaultsize_h">400dip</dimen>
|
||||
<dimen name="app_minimumsize_w">400dip</dimen>
|
||||
<dimen name="app_minimumsize_h">200dip</dimen>
|
||||
|
||||
</resources>
|
@ -58,4 +58,6 @@
|
||||
<string name="menu_debug">Debug</string>
|
||||
<string name="choose_account_to_login">Choose account to login</string>
|
||||
<string name="login_failed">Login failed.</string>
|
||||
<string name="search_hint">Search Locations</string>
|
||||
<string name="menu_search">Search</string>
|
||||
</resources>
|
8
mobile/res/xml/searchable.xml
Normal file
8
mobile/res/xml/searchable.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:label="@string/app_name"
|
||||
android:hint="@string/search_hint"
|
||||
android:voiceSearchMode="showVoiceSearchButton|launchRecognizer"
|
||||
android:voiceLanguageModel="web_search"
|
||||
android:voiceMaxResults="1">
|
||||
</searchable>
|
@ -153,7 +153,7 @@ public class IITC_DeviceAccountLogin implements AccountManagerCallback<Bundle> {
|
||||
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();
|
||||
}
|
||||
|
@ -64,6 +64,13 @@ public class IITC_JSInterface {
|
||||
.show();
|
||||
}
|
||||
|
||||
// exit IITC Mobile
|
||||
@JavascriptInterface
|
||||
public void exitIITC() {
|
||||
Log.d("iitcm","no back stack...finishing iitc");
|
||||
((IITC_Mobile) context).finish();
|
||||
}
|
||||
|
||||
// get layers and list them in a dialog
|
||||
@JavascriptInterface
|
||||
public void setLayers(String base_layer, String overlay_layer) {
|
||||
|
@ -4,6 +4,7 @@ import java.io.IOException;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.app.SearchManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
@ -16,7 +17,6 @@ import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.StrictMode;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
@ -25,6 +25,7 @@ import android.view.MenuItem;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.SearchView;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class IITC_Mobile extends Activity {
|
||||
@ -32,7 +33,6 @@ public class IITC_Mobile extends Activity {
|
||||
private static final int REQUEST_LOGIN = 1;
|
||||
|
||||
private IITC_WebView iitc_view;
|
||||
private boolean back_button_pressed = false;
|
||||
private OnSharedPreferenceChangeListener listener;
|
||||
private String intel_url = "https://www.ingress.com/intel";
|
||||
private boolean user_loc = false;
|
||||
@ -42,6 +42,7 @@ public class IITC_Mobile extends Activity {
|
||||
private boolean fullscreen_actionbar = false;
|
||||
private ActionBar actionBar;
|
||||
private IITC_DeviceAccountLogin mLogin;
|
||||
private MenuItem searchMenuItem;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -120,8 +121,17 @@ public class IITC_Mobile extends Activity {
|
||||
|
||||
fullscreen_actionbar = sharedPref.getBoolean("pref_fullscreen_actionbar", false);
|
||||
|
||||
handleIntent(getIntent(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
setIntent(intent);
|
||||
handleIntent(intent, false);
|
||||
}
|
||||
|
||||
private void handleIntent(Intent intent, boolean onCreate) {
|
||||
// load new iitc web view with ingress intel page
|
||||
Intent intent = getIntent();
|
||||
String action = intent.getAction();
|
||||
if (Intent.ACTION_VIEW.equals(action)) {
|
||||
Uri uri = intent.getData();
|
||||
@ -133,7 +143,15 @@ public class IITC_Mobile extends Activity {
|
||||
Log.d("iitcm", "loading url...");
|
||||
this.loadUrl(url);
|
||||
}
|
||||
} else {
|
||||
} else if (Intent.ACTION_SEARCH.equals(action)) {
|
||||
String query = intent.getStringExtra(SearchManager.QUERY);
|
||||
query = query.replace("'", "''");
|
||||
final SearchView searchView =
|
||||
(SearchView) searchMenuItem.getActionView();
|
||||
searchView.setQuery(query, false);
|
||||
searchView.clearFocus();
|
||||
iitc_view.loadUrl("javascript:search('" + query + "');");
|
||||
} else if (onCreate){
|
||||
this.loadUrl(intel_url);
|
||||
}
|
||||
}
|
||||
@ -216,29 +234,21 @@ public class IITC_Mobile extends Activity {
|
||||
this.toggleFullscreen();
|
||||
return;
|
||||
}
|
||||
if (this.back_button_pressed) {
|
||||
super.onBackPressed();
|
||||
return;
|
||||
}
|
||||
|
||||
iitc_view.loadUrl("javascript: window.goBack();");
|
||||
this.back_button_pressed = true;
|
||||
Toast.makeText(this, "Press twice to exit", Toast.LENGTH_SHORT).show();
|
||||
|
||||
// reset back button after 0.5 seconds
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
back_button_pressed = false;
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
getMenuInflater().inflate(R.menu.main, menu);
|
||||
|
||||
// Get the SearchView and set the searchable configuration
|
||||
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
|
||||
this.searchMenuItem = menu.findItem(R.id.menu_search);
|
||||
final SearchView searchView =
|
||||
(SearchView) searchMenuItem.getActionView();
|
||||
// Assumes current activity is the searchable activity
|
||||
searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
|
||||
searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -246,19 +256,19 @@ public class IITC_Mobile extends Activity {
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Handle item selection
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home :
|
||||
case android.R.id.home:
|
||||
iitc_view.loadUrl("javascript: window.show('map');");
|
||||
actionBar.setTitle(getString(R.string.menu_map));
|
||||
return true;
|
||||
case R.id.menu_map :
|
||||
case R.id.menu_map:
|
||||
iitc_view.loadUrl("javascript: window.show('map');");
|
||||
actionBar.setTitle(getString(R.string.menu_map));
|
||||
return true;
|
||||
case R.id.reload_button :
|
||||
case R.id.reload_button:
|
||||
this.loadUrl(intel_url);
|
||||
actionBar.setTitle(getString(R.string.menu_map));
|
||||
return true;
|
||||
case R.id.toggle_fullscreen :
|
||||
case R.id.toggle_fullscreen:
|
||||
toggleFullscreen();
|
||||
return true;
|
||||
case R.id.layer_chooser:
|
||||
@ -266,43 +276,43 @@ public class IITC_Mobile extends Activity {
|
||||
iitc_view.loadUrl("javascript: window.layerChooser.getLayers()");
|
||||
return true;
|
||||
// get the users current location and focus it on map
|
||||
case R.id.locate :
|
||||
case R.id.locate:
|
||||
iitc_view.loadUrl("javascript: window.show('map');");
|
||||
iitc_view.loadUrl("javascript: window.map.locate({setView : true, maxZoom: 15});");
|
||||
actionBar.setTitle(getString(R.string.menu_map));
|
||||
return true;
|
||||
// start settings activity
|
||||
case R.id.action_settings :
|
||||
case R.id.action_settings:
|
||||
Intent intent = new Intent(this, IITC_Settings.class);
|
||||
intent.putExtra("iitc_version", iitc_view.getWebViewClient()
|
||||
.getIITCVersion());
|
||||
startActivity(intent);
|
||||
return true;
|
||||
case R.id.menu_info :
|
||||
case R.id.menu_info:
|
||||
iitc_view.loadUrl("javascript: window.show('info');");
|
||||
actionBar.setTitle(getString(R.string.menu_info));
|
||||
return true;
|
||||
case R.id.menu_full :
|
||||
case R.id.menu_full:
|
||||
iitc_view.loadUrl("javascript: window.show('full');");
|
||||
actionBar.setTitle(getString(R.string.menu_full));
|
||||
return true;
|
||||
case R.id.menu_compact :
|
||||
case R.id.menu_compact:
|
||||
iitc_view.loadUrl("javascript: window.show('compact');");
|
||||
actionBar.setTitle(getString(R.string.menu_compact));
|
||||
return true;
|
||||
case R.id.menu_public :
|
||||
case R.id.menu_public:
|
||||
iitc_view.loadUrl("javascript: window.show('public');");
|
||||
actionBar.setTitle(getString(R.string.menu_public));
|
||||
return true;
|
||||
case R.id.menu_faction :
|
||||
case R.id.menu_faction:
|
||||
iitc_view.loadUrl("javascript: window.show('faction');");
|
||||
actionBar.setTitle(getString(R.string.menu_faction));
|
||||
return true;
|
||||
case R.id.menu_debug :
|
||||
case R.id.menu_debug:
|
||||
iitc_view.loadUrl("javascript: window.show('debug')");
|
||||
actionBar.setTitle(getString(R.string.menu_debug));
|
||||
return true;
|
||||
default :
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
@ -377,12 +387,12 @@ public class IITC_Mobile extends Activity {
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
switch (requestCode) {
|
||||
case REQUEST_LOGIN :
|
||||
case REQUEST_LOGIN:
|
||||
// authentication activity has returned. mLogin will continue authentication
|
||||
mLogin.onActivityResult(resultCode, data);
|
||||
break;
|
||||
|
||||
default :
|
||||
default:
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
}
|
||||
@ -399,7 +409,7 @@ public class IITC_Mobile extends Activity {
|
||||
/**
|
||||
* called after successful login
|
||||
*/
|
||||
public void loginSucceded() {
|
||||
public void loginSucceeded() {
|
||||
// garbage collection
|
||||
mLogin = null;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ public class IITC_WebView extends WebView {
|
||||
|
||||
// init web view
|
||||
private void iitc_init(Context c) {
|
||||
if ( this.isInEditMode() ) return;
|
||||
settings = this.getSettings();
|
||||
settings.setJavaScriptEnabled(true);
|
||||
settings.setDomStorageEnabled(true);
|
||||
|
BIN
plugins/basemap-blank-tile.png
Normal file
BIN
plugins/basemap-blank-tile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 562 B |
51
plugins/basemap-blank.user.js
Normal file
51
plugins/basemap-blank.user.js
Normal file
@ -0,0 +1,51 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-basemap-blank@jonatkins
|
||||
// @name IITC plugin: Blank map
|
||||
// @version 0.1.0.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add a blank map layer - no roads or other features.
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
// @match http://www.ingress.com/intel*
|
||||
// @grant none
|
||||
// ==/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 ////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// use own namespace for plugin
|
||||
window.plugin.mapTileBlank = function() {};
|
||||
|
||||
window.plugin.mapTileBlank.addLayer = function() {
|
||||
|
||||
var blankOpt = {attribution: '', maxZoom: 20};
|
||||
var blank = new L.TileLayer('@@INCLUDEIMAGE:plugins/basemap-blank-tile.png@@', blankOpt);
|
||||
|
||||
layerChooser.addBaseLayer(blank, "Blank Map");
|
||||
};
|
||||
|
||||
var setup = window.plugin.mapTileBlank.addLayer;
|
||||
|
||||
// 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);
|
102
plugins/basemap-cloudmade.user.js
Executable file
102
plugins/basemap-cloudmade.user.js
Executable file
@ -0,0 +1,102 @@
|
||||
//******************************
|
||||
//******************************
|
||||
//******** 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
|
||||
|
||||
// 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.
|
||||
|
||||
//******************************
|
||||
//******************************
|
||||
//******************************
|
||||
|
||||
|
||||
// ==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);
|
58
plugins/basemap-opencyclemap.user.js
Normal file
58
plugins/basemap-opencyclemap.user.js
Normal file
@ -0,0 +1,58 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-basemap-opencyclepam@jonatkins
|
||||
// @name IITC plugin: OpenCycleMap.org map tiles
|
||||
// @version 0.1.0.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the OpenCycleMap.org map tiles as an optional layer
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
// @match http://www.ingress.com/intel*
|
||||
// @grant none
|
||||
// ==/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 ////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// use own namespace for plugin
|
||||
window.plugin.mapTileOpenCycleMap = function() {};
|
||||
|
||||
window.plugin.mapTileOpenCycleMap.addLayer = function() {
|
||||
|
||||
//the Thunderforest (OpenCycleMap) tiles are free to use - http://www.thunderforest.com/terms/
|
||||
|
||||
osmAttribution = 'Map data © OpenStreetMap';
|
||||
var ocmOpt = {attribution: 'Tiles © OpenCycleMap, '+osmAttribution, maxZoom: 18};
|
||||
var ocmCycle = new L.TileLayer('http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png', ocmOpt);
|
||||
var ocmTransport = new L.TileLayer('http://{s}.tile2.opencyclemap.org/transport/{z}/{x}/{y}.png', ocmOpt);
|
||||
var ocmLandscape = new L.TileLayer('http://{s}.tile3.opencyclemap.org/landscape/{z}/{x}/{y}.png', ocmOpt);
|
||||
|
||||
layerChooser.addBaseLayer(ocmCycle, "Thunderforest OpenCycleMap");
|
||||
layerChooser.addBaseLayer(ocmTransport, "Thunderforest Transport");
|
||||
layerChooser.addBaseLayer(ocmLandscape, "Thunderforest Landscape");
|
||||
};
|
||||
|
||||
var setup = window.plugin.mapTileOpenCycleMap.addLayer;
|
||||
|
||||
// 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);
|
55
plugins/basemap-openstreetmap.user.js
Normal file
55
plugins/basemap-openstreetmap.user.js
Normal file
@ -0,0 +1,55 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-basemap-openstreetpam@jonatkins
|
||||
// @name IITC plugin: OpenStreetMap.org map tiles
|
||||
// @version 0.1.0.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the native OpenStreetMap.org map tiles as an optional layer
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
// @match http://www.ingress.com/intel*
|
||||
// @grant none
|
||||
// ==/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 ////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// use own namespace for plugin
|
||||
window.plugin.mapTileOpenStreetMap = function() {};
|
||||
|
||||
window.plugin.mapTileOpenStreetMap.addLayer = function() {
|
||||
|
||||
//OpenStreetMap tiles - we shouldn't use these by default - https://wiki.openstreetmap.org/wiki/Tile_usage_policy
|
||||
// "Heavy use (e.g. distributing an app that uses tiles from openstreetmap.org) is forbidden without prior permission from the System Administrators"
|
||||
|
||||
osmAttribution = 'Map data © OpenStreetMap contributors';
|
||||
var osmOpt = {attribution: osmAttribution, maxZoom: 18};
|
||||
var osm = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', osmOpt);
|
||||
|
||||
layerChooser.addBaseLayer(osm, "OpenStreetMap");
|
||||
};
|
||||
|
||||
var setup = window.plugin.mapTileOpenStreetMap.addLayer;
|
||||
|
||||
// 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);
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-draw-tools@breunigs
|
||||
// @name IITC plugin: draw tools
|
||||
// @version 0.4.0.@@DATETIMEVERSION@@
|
||||
// @version 0.4.1.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
@ -141,7 +141,7 @@ window.plugin.drawTools.boot = function() {
|
||||
});
|
||||
|
||||
//add the layer
|
||||
window.addLayerGroup('Drawn Items', window.plugin.drawTools.drawnItems);
|
||||
window.addLayerGroup('Drawn Items', window.plugin.drawTools.drawnItems, true);
|
||||
|
||||
|
||||
//place created items into the specific layer
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @id max-links@boombuler
|
||||
// @name IITC plugin: Max Links
|
||||
// @version 0.3.0.@@DATETIMEVERSION@@
|
||||
// @version 0.3.1.@@DATETIMEVERSION@@
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Calculates how to link the portals to create the maximum number of fields.
|
||||
@ -117,7 +117,7 @@ window.plugin.maxLinks.setup = function() {
|
||||
window.plugin.maxLinks.updateLayer();
|
||||
});
|
||||
window.map.on('zoomend moveend', window.plugin.maxLinks.updateLayer);
|
||||
window.addLayerGroup('Maximum Links', window.plugin.maxLinks.layer);
|
||||
window.addLayerGroup('Maximum Links', window.plugin.maxLinks.layer, false);
|
||||
}
|
||||
var setup = window.plugin.maxLinks.setup;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-player-tracker@breunigs
|
||||
// @name IITC Plugin: Player tracker
|
||||
// @version 0.9.3.@@DATETIMEVERSION@@
|
||||
// @version 0.9.4.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
@ -48,7 +48,7 @@ window.plugin.playerTracker.setup = function() {
|
||||
}});
|
||||
|
||||
plugin.playerTracker.drawnTraces = new L.LayerGroup();
|
||||
window.addLayerGroup('Player Tracker', plugin.playerTracker.drawnTraces);
|
||||
window.addLayerGroup('Player Tracker', plugin.playerTracker.drawnTraces, true);
|
||||
map.on('layeradd',function(obj) {
|
||||
if(obj.layer === plugin.playerTracker.drawnTraces)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-portals-list@teo96
|
||||
// @name IITC plugin: show list of portals
|
||||
// @version 0.0.12.@@DATETIMEVERSION@@
|
||||
// @version 0.0.13.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
@ -54,9 +54,13 @@ window.plugin.portalslist.getPortals = function() {
|
||||
//console.log('** getPortals');
|
||||
var retval=false;
|
||||
|
||||
var displayBounds = map.getBounds();
|
||||
|
||||
window.plugin.portalslist.listPortals = [];
|
||||
//get portals informations from IITC
|
||||
$.each(window.portals, function(i, portal) {
|
||||
// eliminate offscreen portals (selected, and in padding)
|
||||
if(!displayBounds.contains(portal.getLatLng())) return true;
|
||||
|
||||
retval=true;
|
||||
var d = portal.options.details;
|
||||
|
@ -13,22 +13,21 @@ offers many more features. It is available for
|
||||
|
||||
<h3>Latest news</h3>
|
||||
|
||||
<h4>2nd May 2013</h4>
|
||||
<p>
|
||||
IITC version 0.11.3 has been released. This should vastly reduce the chance of getting REQUEST_FAILED errors
|
||||
while scrolling/zooming the map frequently. The passcode redemption code has been updated, and there are improvements
|
||||
to the URL link handling. The portals-list plugin has been updated, and bug fixes made to the
|
||||
player tracker. A new plugin to show portal levels as numbers has been added too.
|
||||
</p>
|
||||
<p>
|
||||
IITC Mobile 0.3.2 is also available. Along with the above, this includes a new option to show your current
|
||||
position on the map.
|
||||
</p>
|
||||
|
||||
<h4>28th April 2013</h4>
|
||||
<h4>22nd May 2013</h4>
|
||||
<p>
|
||||
New website launched! A major revamp of the website has been made. Thanks to the various users who contributed
|
||||
logos and site templates.
|
||||
IITC version 0.12.0 has been released. This contains quite a few changes and new features, including
|
||||
<ul>
|
||||
<li>Portal highlighter system - and many portal highlighter plugins</li>
|
||||
<li>Dialogs - can be kept open and dragged while viewing the map</li>
|
||||
<li>Layers - the enabled layers are now remembered when you next load the intel site</li>
|
||||
<li>Improved request limits - more improvements have been made in this area</li>
|
||||
<li>Sync plugin - to sync data from the 'Keys' addon to multiple computers via Google Drive</li>
|
||||
<li>... and many other tweaks, bug fixes, etc</li>
|
||||
</ul>
|
||||
IITC Mobile 0.4.0 is also released. THis has also had major work. Along with the above, it includes a
|
||||
new in-app layer chooser and chat/map switcher, and authentication has been revamped to use the native
|
||||
Android authentication rather than entering your password.
|
||||
</p>
|
||||
|
||||
<a class="btn btn-small" href="?page=news">Older news</a>
|
||||
|
@ -26,7 +26,6 @@ install from the link below.
|
||||
<p>
|
||||
IITC Mobile is still in the early stages of development. Many things do not yet work right. Major known issues are:
|
||||
<ol>
|
||||
<li>The layer chooser selects the first map layer every time it's opened.</li>
|
||||
<li>Some plugins do not work well, or at all, at this time.</li>
|
||||
<li>Serious issues exist on Android 4.0 devices.
|
||||
<a href="https://github.com/jonatkins/ingress-intel-total-conversion/issues/90">details</a>.</li>
|
||||
|
@ -1,5 +1,21 @@
|
||||
<h2>News</h2>
|
||||
|
||||
<h4>22nd May 2013</h4>
|
||||
<p>
|
||||
IITC version 0.12.0 has been released. This contains quite a few changes and new features, including
|
||||
<ul>
|
||||
<li>Portal highlighter system - and many portal highlighter plugins</li>
|
||||
<li>Dialogs - can be kept open and dragged while viewing the map</li>
|
||||
<li>Layers - the enabled layers are now remembered when you next load the intel site</li>
|
||||
<li>Improved request limits - more improvements have been made in this area</li>
|
||||
<li>Sync plugin - to sync data from the 'Keys' addon to multiple computers via Google Drive</li>
|
||||
<li>... and many other tweaks, bug fixes, etc</li>
|
||||
</ul>
|
||||
IITC Mobile 0.4.0 is also released. THis has also had major work. Along with the above, it includes a
|
||||
new in-app layer chooser and chat/map switcher, and authentication has been revamped to use the native
|
||||
Android authentication rather than entering your password.
|
||||
</p>
|
||||
|
||||
<h4>2nd May 2013</h4>
|
||||
<p>
|
||||
IITC version 0.11.3 has been released. This should vastly reduce the chance of getting REQUEST_FAILED errors
|
||||
|
Loading…
x
Reference in New Issue
Block a user