togpx icon indicating copy to clipboard operation
togpx copied to clipboard

Issue with togpx method when trying to convert geojson object to gpx

Open NevenD opened this issue 4 years ago • 2 comments

I have an issue when trying to convert from geojson to gpx

This is my geojson object that I'm trying to convert

{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"Testna ruta","desc":"Testna ruta aplikacije"},"geometry":{"type":"LineString","coordinates":[[15.807662,46.172293,241],[15.736605,46.156474,178],[15.713765,46.121305,214],[15.754369,46.117787,240],[15.794973,46.140651,178],[15.833039,46.142409,244],[15.825426,46.107231,227]]}}]}

And this is an error that I'm getting 1

and basically I'm passing above object into togpx method. const gpxData = togpx(geojson);

Can someone explain me what I'm doing wrong?

NevenD avatar Dec 19 '21 20:12 NevenD

Same for me. Any news here yet?

jolgau avatar Feb 06 '22 17:02 jolgau

This error happened to me when I started transforming CJS to ESM, since apparently the prior setup was fine with the togpx script's several undefined variables.

I fixed the module here, albeit with webkit tests removed due to outdated dependencies: https://github.com/rvillanueva/togpx

rvillanueva avatar Nov 30 '23 19:11 rvillanueva