From b6c7f6d70cd87f9d3b8b7f6eaff05ea2d9efe816 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Thu, 2 Feb 2012 18:13:11 +0400 Subject: [PATCH] compute distance works --- src/org/average/whereami/LastLocation.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/org/average/whereami/LastLocation.java b/src/org/average/whereami/LastLocation.java index 914a615..b710e16 100644 --- a/src/org/average/whereami/LastLocation.java +++ b/src/org/average/whereami/LastLocation.java @@ -36,7 +36,7 @@ public final class LastLocation extends Oracle { loc_names = res.getStringArray(R.array.loc_names); loc_lats = res.getStringArray(R.array.loc_lats); loc_lons = res.getStringArray(R.array.loc_lons); - loc_lons = res.getStringArray(R.array.loc_dists); + loc_dists = res.getStringArray(R.array.loc_dists); HttpTransport transport = AndroidHttp.newCompatibleTransport(); JsonFactory jsonFactory = new JacksonFactory(); @@ -103,11 +103,11 @@ public final class LastLocation extends Oracle { Double.parseDouble(loc_lons[i])); Log.v(TAG, "Dist from " + loc_names[i] + " is " + dist); - //if ((loc_dists[i] == "0") || - // (dist < Double.parseDouble(loc_dists[i]))) { - // locmsg = loc_names[i]; - // break; - //} + if ((loc_dists[i] == "0") || + (dist < Double.parseDouble(loc_dists[i]))) { + locmsg = loc_names[i]; + break; + } } return locmsg; } -- 2.43.0