Comment #7 on issue 1545 by
mikechar...@gmail.com: MyTracks KML doesn't
I believe I may have some insight into this problem, and certainly into a
incompatibility between Google Earth for desktop (and perhaps Maps Engine
as well) and My Tracks, so here it is. There is an incompatibility is in
the file output structure of the KML. Google Earth can open any kml/kmz
from my tracks of earth, etc, but once that file has been saved in Earth,
the file will not open correctly in My Tracks ever again. Here is why:
The output of Kml from My Tracks stores the track in the <gx:track> segment
by writing the <when> immediately followed by the <gx:coord>, then the next
<when> <gx:coord> set, etc. When the file is opened up in Earth (and
perhaps maps engine does the same), it understands this, but it writes the
file back out with all the time data first (all the <when>s) and then all
the coordinate data (<gs:coord>s). Earth interpret either format
correctly. Once the Kml is reopened in My Tracks, My Tracks sees the first
<when> and expects a <gx:coord> to follow, which it does not, so it moves
on the the next <when> where the same thing happens and so on. finally at
the last <when> (the supposed end to the timeline), there actually is a
<gx:coord> next (which should have been the coord the the start of the
track), so it creates that point). So now we have one point with a correct
starting location, but occurring at the ending time. Then My Tracks reads
in the rest of the <gx:coord> data, but there is no remaining time (<when>)
statements, so it assumes and assigns the current instant time. This means
all the rest of the track has the same time coordinate. What you end up
with is a track that shows starting at the end time, and displays the rest
of the track for only an instant that corresponds to the time at which the
file was read into My tracks. If you did all of this from within Google
Drive, It has now obliterated the original time data irretrievably from the
file (hope you made a backup). This is also the reason that speed
calculations are now junk, because the whole tack occurs in an instant. It
seems like the likely fix would be just to make My Tracks Understand how
the read both formats of Kml, perhaps by having the code look for the first
<gx:coord> upon reading the first <when>, then returning to read the second
<when> and then looking for a second <gx:coord>, etc. I am not sure what
the source code does when trying to read the file now. The <when> and
<gx:coord> data could also be read as arrays, and scan the file for the
matching data statements. I hope I am not hijacking the OP's thread.