Add gpx speed parser

This commit is contained in:
Victor Shcherb 2017-02-23 10:55:14 +01:00
parent 24c3fc5bd6
commit 847b627843

View file

@ -1164,6 +1164,14 @@ public class GPXUtilities {
((WptPt) parse).desc = readText(parser, "desc"); ((WptPt) parse).desc = readText(parser, "desc");
} else if (parser.getName().equals("cmt")) { } else if (parser.getName().equals("cmt")) {
((WptPt) parse).comment = readText(parser, "cmt"); ((WptPt) parse).comment = readText(parser, "cmt");
} else if (parser.getName().equals("speed") ) {
try {
String value = readText(parser, "cmt");
((WptPt) parse).speed = Float.parseFloat(value);
((WptPt) parse).getExtensionsToWrite().put("speed", value);
} catch (NumberFormatException e) {
}
}
} else if (parser.getName().equals("link")) { } else if (parser.getName().equals("link")) {
((WptPt) parse).link = parser.getAttributeValue("", "href"); ((WptPt) parse).link = parser.getAttributeValue("", "href");
} else if (tag.equals("category")) { } else if (tag.equals("category")) {