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