GPXParser.js icon indicating copy to clipboard operation
GPXParser.js copied to clipboard

Distance Object

Open sgedye opened this issue 4 years ago • 1 comments

I think that "cumul" in distance object (i.e. gpx.tracks[0].distance.cumul) returns an array of floats (or number), rather than just a single float (number).

e.g.: this:

Distance object

Property Type Description
total Float Total distance of the Route/Track
cumul Float Cumulative distance at each point of the Route/Track

should be this:

Distance object

Property Type Description
total Float Total distance of the Route/Track
cumul Float[] Cumulative distance at each point of the Route/Track

sgedye avatar Jul 14 '21 01:07 sgedye

Especially the incorrect type in the index.d.ts is somehow annoying as the type has to be overriden or casted at every usage location.

As far as I can see only the README.md and the index.d.ts need to be adjusted. If I can help out with a merge request with a fix feel free to let me know.

swoeste avatar Apr 24 '22 14:04 swoeste