Small fixes
This commit is contained in:
parent
9cc1da2fb6
commit
ec63b4ce11
2 changed files with 5 additions and 2 deletions
|
@ -2061,8 +2061,10 @@ public class GPXUtilities {
|
|||
} else if (tag.equals("speed")) {
|
||||
try {
|
||||
String value = readText(parser, "speed");
|
||||
((WptPt) parse).speed = Float.parseFloat(value);
|
||||
parse.getExtensionsToWrite().put("speed", value);
|
||||
if (!Algorithms.isEmpty(value)) {
|
||||
((WptPt) parse).speed = Float.parseFloat(value);
|
||||
parse.getExtensionsToWrite().put("speed", value);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
}
|
||||
} else if (tag.equals("link")) {
|
||||
|
|
|
@ -484,6 +484,7 @@ public class Algorithms {
|
|||
ByteArrayOutputStream bous = new ByteArrayOutputStream();
|
||||
GZIPOutputStream gzout = new GZIPOutputStream(bous);
|
||||
gzout.write(str.getBytes());
|
||||
gzout.close();
|
||||
return bous.toByteArray();
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
|
|
Loading…
Reference in a new issue