You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm constantly fighting this thing to take the right format file. I have a local file that I have parsed sucessfully before, but when trying to port all of my code to server and run:
I don't know from where come the parser.parseString function but you shouldn't need it. fs.readFile already return a string that should be directly parsed.
letgpx=newgpxParser();fs.readFile(<YourFilePath>, {encoding: "utf-8"}, function (error, data) {gpx.parse(data);console.log("Found "+gpx.tracks.length+" tracks");});
Hi Luuka - I did eventually get it to work. Thanks for the response. I was asking more in terms of some info regarding the success of the call to gxp.parse(<data>).
hey, @Luuka thanks for your lib! I have the same question: is there a way to determine whether parsing has finished successfully?
I noticed that the library just stops parsing when an unexpected tag happens and I didn't find a way of ensuring that the whole file was parsed.
I'm constantly fighting this thing to take the right format file. I have a local file that I have parsed sucessfully before, but when trying to port all of my code to server and run:
The code above never shows any tracks.
Any tips on locating errors when parsing this thing?
The text was updated successfully, but these errors were encountered: