fix, time was set to '' when loading data without time
parent
2adf185432
commit
1adfa4c37a
|
@ -604,7 +604,7 @@ function generateGpx(){
|
||||||
var alt = layer._latlngs[i].alt;
|
var alt = layer._latlngs[i].alt;
|
||||||
var time = layer._latlngs[i].time;
|
var time = layer._latlngs[i].time;
|
||||||
gpxText = gpxText + ' <trkpt lat="'+lat+'" lon="'+lng+'">\n';
|
gpxText = gpxText + ' <trkpt lat="'+lat+'" lon="'+lng+'">\n';
|
||||||
if (time !== undefined){
|
if (time){
|
||||||
gpxText = gpxText + ' <time>'+time+'</time>\n';
|
gpxText = gpxText + ' <time>'+time+'</time>\n';
|
||||||
}
|
}
|
||||||
if (alt !== undefined){
|
if (alt !== undefined){
|
||||||
|
@ -687,9 +687,11 @@ function drawLine(latlngs, name, desc, cmt, gpxtype, times){
|
||||||
});
|
});
|
||||||
if (times.length === p._latlngs.length){
|
if (times.length === p._latlngs.length){
|
||||||
for (var i=0; i<times.length; i++){
|
for (var i=0; i<times.length; i++){
|
||||||
|
if (times[i]){
|
||||||
p._latlngs[i].time = times[i];
|
p._latlngs[i].time = times[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var layer = onCreated(gpxtype, p);
|
var layer = onCreated(gpxtype, p);
|
||||||
if (name !== ''){
|
if (name !== ''){
|
||||||
if (tst === 'p'){
|
if (tst === 'p'){
|
||||||
|
|
Loading…
Reference in New Issue