diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2013-07-09 21:53:53 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2013-07-14 13:50:37 +0200 |
| commit | f5a8c176e160812b7350f88d7bc4d3014e3ec060 (patch) | |
| tree | 3734c66adbb827fc2440b71398c6f9d7e290fcfa /main/src/cgeo/geocaching/geopoint/Units.java | |
| parent | b7a84cf3cd81526f3396735e2134771a73cbb7a7 (diff) | |
| download | cgeo-f5a8c176e160812b7350f88d7bc4d3014e3ec060.zip cgeo-f5a8c176e160812b7350f88d7bc4d3014e3ec060.tar.gz cgeo-f5a8c176e160812b7350f88d7bc4d3014e3ec060.tar.bz2 | |
Remove elevation handling
Geocaches do not contain useful elevation information. We used to get it
using Google API, but the information was not very useful because our
handling of altitude was inconsistent.
Also, the Google elevation API usage limits states that "the Elevation
API may only be used in conjunction with displaying results on a Google
map; using elevation data without displaying a map for which elevation
data was requested is prohibited".
This removes elevation handling completely, except in the settings to
avoid getting in the way of the settings rewrite. The elevation related
settings should be removed there instead when both works are merged.
Diffstat (limited to 'main/src/cgeo/geocaching/geopoint/Units.java')
| -rw-r--r-- | main/src/cgeo/geocaching/geopoint/Units.java | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/main/src/cgeo/geocaching/geopoint/Units.java b/main/src/cgeo/geocaching/geopoint/Units.java index 75d71d0..b99e00e 100644 --- a/main/src/cgeo/geocaching/geopoint/Units.java +++ b/main/src/cgeo/geocaching/geopoint/Units.java @@ -47,18 +47,6 @@ public class Units { return String.format(formatString + " %s", scaled.left, scaled.right); } - /** - * Get human readable elevation, depending on settings for metric units. - * Result is rounded to full meters/feet, as the sensors don't have that precision anyway. - * - * @param meters - * @return - */ - public static String getElevation(float meters) { - final ImmutablePair<Double, String> scaled = scaleDistance(meters / 1000f); - return (meters >= 0 ? "↥ " : "↧ ") + String.format("%d %s", Math.abs(Math.round(scaled.left)), scaled.right); - } - public static String getDistanceFromMeters(float meters) { return getDistanceFromKilometers(meters / 1000f); } |
