GPXParser.js
GPXParser.js copied to clipboard
Distance Object
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 |
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.