--- android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2010/01/27 05:40:38 553 +++ android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2010/01/27 05:51:45 554 @@ -202,10 +202,15 @@ Location loc = locationLookup.getLocation(); StringBuffer message = new StringBuffer(); message.append("Location info:\n"); - message.append("-Obtained by: ").append(loc != null ? loc.getProvider() : "-").append("\n"); - message.append("-Accuracy: ").append(loc != null ? (int)loc.getAccuracy() : "-").append("m\n"); - message.append("-Latitude: ").append(loc != null ? loc.getLatitude() : "-").append("\n"); - message.append("-Longitude: ").append(loc != null ? loc.getLongitude() : "-").append("\n"); + if (loc != null) { + message.append("-Obtained by: ").append( loc.getProvider() ).append("\n"); + message.append("-Accuracy: ").append( (int)loc.getAccuracy()).append("m\n"); + message.append("-Latitude: ").append( loc.getLatitude()).append("\n"); + message.append("-Longitude: ").append( loc.getLongitude() ).append("\n"); + } else { + message.append(" - No location data!"); + } + MessageBox.showMessage(this, message.toString()); break; default: