--- android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2009/10/29 14:20:16 489 +++ android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2010/01/22 11:28:56 546 @@ -2,7 +2,7 @@ import java.util.ArrayList; import java.util.List; -import java.util.Locale; + import android.app.AlertDialog; import android.app.Dialog; @@ -12,14 +12,12 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; -import android.location.Address; -import android.location.Geocoder; import android.location.Location; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.os.Message; -import android.util.Log; + import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.Menu; @@ -206,7 +204,8 @@ message.append("Location info:\n"); message.append("-Obtained by: ").append(loc != null ? loc.getProvider() : "-").append("\n"); message.append("-Accuracy: ").append(loc != null ? (int)loc.getAccuracy() : "-").append("m\n"); - + message.append("-Latitude: ").append(loc != null ? loc.getLatitude() : "-").append("\n"); + message.append("-Longitude: ").append(loc != null ? loc.getLongitude() : "-").append("\n"); MessageBox.showMessage(this, message.toString()); break; default: @@ -356,6 +355,7 @@ } + /* TODO: Remove this no longer needed function String lookupAddress(double latitude, double longitude) { Geocoder coder = new Geocoder(this, new Locale("da")); @@ -380,7 +380,7 @@ } return sb.toString(); - } + }*/ //////////////////////////////////////////////////////////////////////////// @@ -494,10 +494,7 @@ List stations = stationProvider.getStations(); for (StationBean station : stations) { - String addr = lookupAddress(station.getLatitude(), station.getLongitude()); - station.setAddress(addr); - - + if (method.equals(LookupMethod.ByName) || method.equals(LookupMethod.ByList)) { if (loc != null) { //only do the distance calc if we have a location dummy.setLatitude(station.getLatitude());