--- android/TrainInfo/src/dk/thoerup/traininfo/TrainInfoList.java 2009/09/11 08:34:57 315 +++ android/TrainInfo/src/dk/thoerup/traininfo/TrainInfoList.java 2009/09/11 08:48:18 316 @@ -154,15 +154,11 @@ double latitude = station.getLatitude(); double longitude = station.getLongitude(); - String addr = station.getAddress(); - if (addr == null || addr.trim().equals("") ) - addr = lookupAddress(latitude, longitude); Intent intent = new Intent(this, DepartureList.class); intent.putExtra("name", station.getName()); - intent.putExtra("address", addr); intent.putExtra("distance", station.getDistance()); intent.putExtra("latitude", latitude); intent.putExtra("longitude", longitude); @@ -170,31 +166,6 @@ startActivity(intent); } - String lookupAddress(double latitude, double longitude) { - - Geocoder coder = new Geocoder(this, new Locale("da")); - StringBuilder sb = new StringBuilder(); - Log.i("lookupaddr", "" + latitude + "/" + longitude); - try { - List
addressList = coder.getFromLocation(latitude, longitude, 1); - Address addr = addressList.get(0); - - - int max = addr.getMaxAddressLineIndex(); - for (int i=0; i0) - sb.append(", "); - - sb.append(addr.getAddressLine(i)); - } - - - } catch (Exception e) { - Log.e("DepartureList", "geocoder failed", e); - } - - return sb.toString(); - } class LocatorTask extends AsyncTask {