From bcc357ca989458a9044a6f292b5b4f8f41c0f942 Mon Sep 17 00:00:00 2001 From: muerwre Date: Mon, 18 Feb 2019 12:17:11 +0700 Subject: [PATCH] gpx fix --- src/utils/gpx.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/utils/gpx.ts b/src/utils/gpx.ts index d8c431c..3297644 100644 --- a/src/utils/gpx.ts +++ b/src/utils/gpx.ts @@ -17,14 +17,29 @@ export const getGPXString = ({ points, title }: IGetGPXString): string => (` ${title || 'GPX Track'} ${ points.reduce((cat, { lat, lng }, index) => ( - `${cat} -` + ` ${cat} + ` ), '') } `); +// export const getGPXString = ({ points, title }: IGetGPXString): string => (` +// +// +// +// ${title || 'GPX Track'} +// ${ +// points.reduce((cat, { lat, lng }, index) => ( +// `${cat} +// ` +// ), '') +// } +// +// +// `); + export const downloadGPXTrack = ({ track, title }: { track: string, title?: string }) => ( saveAs( new Blob([track], { type: 'application/gpx+xml;charset=utf-8' }),