Add gpx speed parser

This commit is contained in:
Victor Shcherb 2017-02-23 10:57:02 +01:00
parent b2e085dd45
commit bd6f8b0811

View file

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