convert gpx to csv (Angular)

Viewed 15

I try to convert one gpx file upload with to csv file.

Unfortunatly, I did't found any npm module or code to did it.

So for that I tried to parse gpx file with one gpx-parser.

For that I created on service to use it (https://www.npmjs.com/package/gpxparser)

but I don't understand how I can use function of this object with my file uploaded.

this is my gpx-parser service.

import { Injectable } from "@angular/core";
import gpxParser from "gpxparser";
@Injectable()

export class convertgpxService{
    constructor(){}
    parser(){
        var gpx = new gpxParser(); //Create gpxParser Object
        gpx.parse("<xml><gpx></gpx></xml>"); 
    }
}
0 Answers
Related