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; |