/[projects]/android/TrainInfo/src/dk/thoerup/traininfo/StationList.java
ViewVC logotype

Diff of /android/TrainInfo/src/dk/thoerup/traininfo/StationList.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 475 by torben, Tue Oct 27 13:39:28 2009 UTC revision 476 by torben, Wed Oct 28 08:16:58 2009 UTC
# Line 483  public class StationList extends ListAct Line 483  public class StationList extends ListAct
483                                  String addr = lookupAddress(station.getLatitude(), station.getLongitude());                                  String addr = lookupAddress(station.getLatitude(), station.getLongitude());
484                                  station.setAddress(addr);                                  station.setAddress(addr);
485                                                                    
486                                  if (method.equals(LookupMethod.ByName) || method.equals(LookupMethod.ByList)) {                                  if (loc != null) { //only do the distance calc if we have a location
487                                          dummy.setLatitude(station.getLatitude());                                          if (method.equals(LookupMethod.ByName) || method.equals(LookupMethod.ByList)) {
488                                          dummy.setLongitude(station.getLongitude());                                                  dummy.setLatitude(station.getLatitude());
489                                          station.setDistance( (int)loc.distanceTo(dummy) );                                                  dummy.setLongitude(station.getLongitude());
490                                                    station.setDistance( (int)loc.distanceTo(dummy) );
491                                            }
492                                    } else {
493                                            station.setDistance(0);
494                                  }                                  }
495                          }                                                                        }                                              
496                                                    

Legend:
Removed from v.475  
changed lines
  Added in v.476

  ViewVC Help
Powered by ViewVC 1.1.20