diff options
Diffstat (limited to 'main/src/cgeo/geocaching/geopoint/Geopoint.java')
| -rw-r--r-- | main/src/cgeo/geocaching/geopoint/Geopoint.java | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/main/src/cgeo/geocaching/geopoint/Geopoint.java b/main/src/cgeo/geocaching/geopoint/Geopoint.java index 1973b03..e8a6dff 100644 --- a/main/src/cgeo/geocaching/geopoint/Geopoint.java +++ b/main/src/cgeo/geocaching/geopoint/Geopoint.java @@ -2,14 +2,8 @@ package cgeo.geocaching.geopoint; import cgeo.geocaching.ICoordinates; import cgeo.geocaching.R; -import cgeo.geocaching.geopoint.GeopointFormatter.Format; -import cgeo.geocaching.network.Network; -import cgeo.geocaching.network.Parameters; -import cgeo.geocaching.utils.Log; import org.apache.commons.lang3.StringUtils; -import org.json.JSONArray; -import org.json.JSONObject; import android.location.Location; import android.os.Parcel; @@ -323,34 +317,6 @@ public final class Geopoint implements ICoordinates, Parcelable { } } - public Double getElevation() { - try { - final String uri = "http://maps.googleapis.com/maps/api/elevation/json"; - final Parameters params = new Parameters( - "sensor", "false", - "locations", format(Format.LAT_LON_DECDEGREE_COMMA)); - final JSONObject response = Network.requestJSON(uri, params); - - if (response == null) { - return null; - } - - if (!StringUtils.equalsIgnoreCase(response.getString("status"), "OK")) { - return null; - } - - if (response.has("results")) { - JSONArray results = response.getJSONArray("results"); - JSONObject result = results.getJSONObject(0); - return result.getDouble("elevation"); - } - } catch (Exception e) { - Log.w("Geopoint.getElevation", e); - } - - return null; - } - @Override public Geopoint getCoords() { return this; |
