diff options
| -rw-r--r-- | main/src/cgeo/geocaching/filter/DistanceFilter.java | 2 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/maps/CGeoMap.java | 4 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/sensors/GeoData.java | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/filter/DistanceFilter.java b/main/src/cgeo/geocaching/filter/DistanceFilter.java index ae96c67..3890571 100644 --- a/main/src/cgeo/geocaching/filter/DistanceFilter.java +++ b/main/src/cgeo/geocaching/filter/DistanceFilter.java @@ -23,7 +23,7 @@ class DistanceFilter extends AbstractFilter { @Override public boolean accepts(final Geocache cache) { - final Geopoint currentPos = new Geopoint(geo.getLocation()); + final Geopoint currentPos = new Geopoint(geo); final Geopoint coords = cache.getCoords(); if (coords == null) { // If a cache has no coordinates, consider it to be out of range. It will diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java index 233f0e6..7cb3183 100644 --- a/main/src/cgeo/geocaching/maps/CGeoMap.java +++ b/main/src/cgeo/geocaching/maps/CGeoMap.java @@ -913,7 +913,7 @@ public class CGeoMap extends AbstractMap implements ViewFactory { // minimum change of location in fraction of map width/height (whatever is smaller) for position overlay update private static final float MIN_LOCATION_DELTA = 0.01f; - Location currentLocation = CgeoApplication.getInstance().currentGeo().getLocation(); + Location currentLocation = CgeoApplication.getInstance().currentGeo(); float currentHeading; private long timeLastPositionOverlayCalculation = 0; @@ -928,7 +928,7 @@ public class CGeoMap extends AbstractMap implements ViewFactory { @Override public void updateGeoDir(final GeoData geo, final float dir) { - currentLocation = geo.getLocation(); + currentLocation = geo; currentHeading = AngleUtils.getDirectionNow(dir); repaintPositionOverlay(); } diff --git a/main/src/cgeo/geocaching/sensors/GeoData.java b/main/src/cgeo/geocaching/sensors/GeoData.java index d0e6389..c0618a5 100644 --- a/main/src/cgeo/geocaching/sensors/GeoData.java +++ b/main/src/cgeo/geocaching/sensors/GeoData.java @@ -41,10 +41,6 @@ public class GeoData extends Location { return gpsLocation.getTime() >= netLocation.getTime() ? gpsLocation : netLocation; } - public Location getLocation() { - return this; - } - private static LocationProviderType getLocationProviderType(final String provider) { if (provider.equals(LocationManager.GPS_PROVIDER)) { return LocationProviderType.GPS; |
