From 6e12c44f54ab6c93dc8f8ee620af96962758bf3e Mon Sep 17 00:00:00 2001 From: Franzz Date: Thu, 2 Jan 2020 14:57:02 +0100 Subject: [PATCH] Add GPX file download --- inc/project.php | 4 +++- masks/project.html | 3 ++- style/_fa.scss | 4 ++++ style/_mask_project.scss | 8 ++++++++ style/spot.css | 2 +- style/spot.css.map | 2 +- 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/inc/project.php b/inc/project.php index b864da8..7af83ac 100644 --- a/inc/project.php +++ b/inc/project.php @@ -126,7 +126,9 @@ class Project extends PhpObject { if(!Converter::isGeoJsonValid($asProject['geofile'])) Converter::convertToGeoJson($asProject['geofile']); - $asProject['geofile'] = Spot::addTimestampToFilePath(Geo::getFilePath($asProject['geofile'], GeoJson::EXT)); + $asProject['geofilepath'] = Spot::addTimestampToFilePath(Geo::getFilePath($asProject['geofile'], GeoJson::EXT)); + $asProject['gpxfilepath'] = Spot::addTimestampToFilePath(Geo::getFilePath($asProject['geofile'], Gpx::EXT)); + unset($asProject['geofile']); $asProject['codename'] = $sCodeName; } return $bSpecificProj?$asProject:$asProjects; diff --git a/masks/project.html b/masks/project.html index bdb933c..58842ab 100644 --- a/masks/project.html +++ b/masks/project.html @@ -142,7 +142,7 @@ function initProject(sProjectCodeName){ //Project Geojson: Hike track $.ajax({ dataType: 'json', - url: self.vars(['project', 'geofile']), + url: self.vars(['project', 'geofilepath']), mimeType: 'application/json' }) ).done(function(aoMessages, aoTracks) { @@ -249,6 +249,7 @@ function initSpotMessages(aoMessages, aoTracks) { var $Label = $('