/[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 477 by torben, Wed Oct 28 08:16:58 2009 UTC revision 478 by torben, Wed Oct 28 08:40:32 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 (loc != null) { //only do the distance calc if we have a location                                  
487                                          if (method.equals(LookupMethod.ByName) || method.equals(LookupMethod.ByList)) {                                  if (method.equals(LookupMethod.ByName) || method.equals(LookupMethod.ByList)) {
488                                            if (loc != null) { //only do the distance calc if we have a location
489                                                  dummy.setLatitude(station.getLatitude());                                                  dummy.setLatitude(station.getLatitude());
490                                                  dummy.setLongitude(station.getLongitude());                                                  dummy.setLongitude(station.getLongitude());
491                                                  station.setDistance( (int)loc.distanceTo(dummy) );                                                  station.setDistance( (int)loc.distanceTo(dummy) );
492                                            } else {
493                                                    station.setDistance(0);
494                                          }                                          }
                                 } else {  
                                         station.setDistance(0);  
495                                  }                                  }
496    
497                          }                                                                        }                                              
498                                                    
499                          return null;                          return null;

Legend:
Removed from v.477  
changed lines
  Added in v.478

  ViewVC Help
Powered by ViewVC 1.1.20