diff --git a/mobile/.idea/copyright/profiles_settings.xml b/mobile/.idea/copyright/profiles_settings.xml
index 3572571a..e7bedf33 100644
--- a/mobile/.idea/copyright/profiles_settings.xml
+++ b/mobile/.idea/copyright/profiles_settings.xml
@@ -1,5 +1,3 @@
-
-
-
+
\ No newline at end of file
diff --git a/mobile/HACKING.md b/mobile/HACKING.md
index 403fc7f3..e1f5a146 100644
--- a/mobile/HACKING.md
+++ b/mobile/HACKING.md
@@ -1,9 +1,8 @@
How does this basically work?
-----------------------------
-At the moment, the Android App is a WebView which renders the normal web page. The IITC script is injected by calling ```iitc_view.loadIITC_JS(Context)```. The app uses a local version of the script, which is located in the assets folder, if no external source is given (see "pref\_iitc\_source").
-
-Communication from app to script is handled by loading Javascript function calls. For example: ```iitc_view.loadUrl("javascript: window.goBack();");```
+At the moment, the Android App is a WebView which renders the normal web page. The IITC script is injected by calling ```iitc_view.loadIITC_JS(Context)```. The app uses a local version of the script, which is located in the assets folder.
+Communication from app to script is handled by loading Javascript function calls. For example: ```iitc_view.loadUrl("javascript: window.alert('foo');");```
Communication from script to app is handled by the JavascriptInterface (see /mobile/src/com/cradle/iitc\_mobile/IITC_JSInterface.java). If a method ```foo(String)``` is defined in JSInterface, it can be called by ```android.foo("Hello World")``` in the IITC script.
diff --git a/mobile/README.md b/mobile/README.md
index 6d4b7e21..136db28e 100644
--- a/mobile/README.md
+++ b/mobile/README.md
@@ -1,11 +1,13 @@
-ingress intel total conversion mobile (IITCM)
+ingress intel total conversion mobile (IITCm)
=====================================
The Android App behaves like the desktop version, but uses the mobile view, which is optimized for mobile devices, as default. Furthermore, there are some nice additions:
- it should be much faster than the standard mobile ingress intel map
-- plugin support
+- supports all official IITC plugins
+
+- easy installation of unofficial plugins (installation via plugin preference, click on *.user.js file or URL, email attachement etc.)
- show users current location
@@ -13,17 +15,13 @@ The Android App behaves like the desktop version, but uses the mobile view, whic
- a geolocate button (you have to enable GPS satellites + location access to use this feature)
-- possibility to use a custom IITC script source
-
-- a click on Portal link copies it to clipboard
-
-- in-app layer chooser
-
-- in-app IITC buttons
-
- in-app search
-- support for unofficial plugins. Just copy the *.user.js files to ```/IITC_Mobile/plugins/``` and they should appear at the top of the plugin list. Note: For every option a new persistent database entry is created. If you want to remove a plugin from your external storage you want to ensure that it is disabled in the settings, otherwise IITCM will always try to load it on start-up. If you messed this up you can wipe app data or add the plugin back to storage, disable it and remove it. Another option would be: Do nothing...it should work even so.
+- configurable fullscreen modes (includes immersive mode on Android 4.4+)
+
+- navigation drawers for IITC views, layer chooser and highlighters
+
+- in-app screenshots
- developer mode: all script source will be loaded from ```/IITC_Mobile/dev/```
diff --git a/plugins/portal-level-numbers.user.js b/plugins/portal-level-numbers.user.js
index fe7e1ee3..405a29b5 100644
--- a/plugins/portal-level-numbers.user.js
+++ b/plugins/portal-level-numbers.user.js
@@ -72,8 +72,8 @@ window.plugin.portalLevelNumbers.addLabel = function(guid,latLng) {
window.plugin.portalLevelNumbers.updatePortalLabels = function() {
- var SQUARE_SIZE = L.Browser.mobile ? (window.plugin.portalLevelNumbers.ICON_SIZE + 3) * window.plugin.portalLevelNumbers.MOBILE_SCALE
- : (window.plugin.portalLevelNumbers.ICON_SIZE + 3);
+ var SQUARE_SIZE = L.Browser.mobile ? (window.plugin.portalLevelNumbers.ICON_SIZE) * window.plugin.portalLevelNumbers.MOBILE_SCALE
+ : (window.plugin.portalLevelNumbers.ICON_SIZE);
// as this is called every time layers are toggled, there's no point in doing it when the layer is off
if (!map.hasLayer(window.plugin.portalLevelNumbers.levelLayerGroup)) {
@@ -96,9 +96,11 @@ window.plugin.portalLevelNumbers.updatePortalLabels = function() {
var point = portalPoints[guid];
var bucketId = L.point([Math.floor(point.x/(SQUARE_SIZE*2)),Math.floor(point.y/SQUARE_SIZE*2)]);
- // the guid is added to four buckets. this way, when testing for overlap we don't need to test
+ // the guid is added to all eight neighbour buckets. this way, when testing for overlap we don't need to test
// all 8 buckets surrounding the one around the particular portal, only the bucket it is in itself
- var bucketIds = [bucketId, bucketId.add([1,0]), bucketId.add([0,1]), bucketId.add([1,1])];
+ var bucketIds = [bucketId, bucketId.add([1,0]), bucketId.add([0,1]), bucketId.add([1,1]),
+ bucketId.subtract([1,0]), bucketId.subtract([0,1]), bucketId.subtract([1,1]),
+ bucketId.add([-1,1]), bucketId.add([1,-1])];
for (var i in bucketIds) {
var b = bucketIds[i].toString();
if (!buckets[b]) buckets[b] = {};