aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/connector/gc
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/connector/gc')
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCMap.java24
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCParser.java1
-rw-r--r--main/src/cgeo/geocaching/connector/gc/IconDecoder.java2
-rw-r--r--main/src/cgeo/geocaching/connector/gc/Tile.java5
4 files changed, 2 insertions, 30 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCMap.java b/main/src/cgeo/geocaching/connector/gc/GCMap.java
index dc2408f..dd81507 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCMap.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCMap.java
@@ -146,30 +146,6 @@ public class GCMap {
throw new JSONException("No data inside JSON");
}
- /*
- * Optimization: the grid can get ignored. The keys are the grid position in the format x_y
- * It's not used at the moment due to optimizations
- * But maybe we need it some day...
- *
- * // attach all keys with the cache positions in the tile
- * Map<String, UTFGridPosition> keyPositions = new HashMap<String, UTFGridPosition>(); // JSON key, (x/y) in
- * grid
- * for (int y = 0; y < grid.length(); y++) {
- * String rowUTF8 = grid.getString(y);
- * if (rowUTF8.length() != (UTFGrid.GRID_MAXX + 1)) {
- * throw new JSONException("Grid has wrong size");
- * }
- *
- * for (int x = 0; x < UTFGrid.GRID_MAXX; x++) {
- * char c = rowUTF8.charAt(x);
- * if (c != ' ') {
- * short id = UTFGrid.getUTFGridId(c);
- * keyPositions.put(keys.getString(id), new UTFGridPosition(x, y));
- * }
- * }
- * }
- */
-
// iterate over the data and construct all caches in this tile
Map<String, List<UTFGridPosition>> positions = new HashMap<String, List<UTFGridPosition>>(); // JSON id as key
Map<String, List<UTFGridPosition>> singlePositions = new HashMap<String, List<UTFGridPosition>>(); // JSON id as key
diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java
index 4d3580c..4ae03bf 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCParser.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java
@@ -144,7 +144,6 @@ public abstract class GCParser {
while (matcherGuidAndDisabled.find()) {
if (matcherGuidAndDisabled.groupCount() > 0) {
- //cache.setGuid(matcherGuidAndDisabled.group(1));
if (matcherGuidAndDisabled.group(2) != null) {
cache.setName(Html.fromHtml(matcherGuidAndDisabled.group(2).trim()).toString());
}
diff --git a/main/src/cgeo/geocaching/connector/gc/IconDecoder.java b/main/src/cgeo/geocaching/connector/gc/IconDecoder.java
index c7b470a..c6a2afc 100644
--- a/main/src/cgeo/geocaching/connector/gc/IconDecoder.java
+++ b/main/src/cgeo/geocaching/connector/gc/IconDecoder.java
@@ -35,7 +35,7 @@ public abstract class IconDecoder {
return false; //out of image position
}
- int numberOfDetections = 7; //for level 12 and 13;
+ int numberOfDetections = 7; //for level 12 and 13
if (zoomlevel < 12) {
numberOfDetections = 5;
}
diff --git a/main/src/cgeo/geocaching/connector/gc/Tile.java b/main/src/cgeo/geocaching/connector/gc/Tile.java
index ca70111..d7b3a48 100644
--- a/main/src/cgeo/geocaching/connector/gc/Tile.java
+++ b/main/src/cgeo/geocaching/connector/gc/Tile.java
@@ -9,6 +9,7 @@ import cgeo.geocaching.utils.LeastRecentlyUsedSet;
import cgeo.geocaching.utils.Log;
import ch.boye.httpclientandroidlib.HttpResponse;
+
import org.eclipse.jdt.annotation.NonNull;
import android.graphics.Bitmap;
@@ -88,10 +89,6 @@ public class Tile {
*
*/
private static int calcY(final Geopoint origin, final int zoomlevel) {
-
- // double latRad = Math.toRadians(origin.getLatitude());
- // return (int) ((1 - (Math.log(Math.tan(latRad) + (1 / Math.cos(latRad))) / Math.PI)) / 2 * numberOfTiles);
-
// Optimization from Bing
double sinLatRad = Math.sin(Math.toRadians(origin.getLatitude()));
// The cut of the fractional part instead of rounding to the nearest integer is intentional and part of the algorithm