I am trying to create a track in Google Earth (Using a KML)
I am using sharpKML for C#
I can successfully create a path.
How do I create a track? I understand that I need to add a "point" and a "when" and I do so by doing the following -
SharpKml.Dom.GX.Track myTrack = new SharpKml.Dom.GX.Track();
GpsSensorDataPoint data = (GpsSensorDataPoint)myGPSDataList[i];
double lat = data.Latitude;
double lon = data.Longitude;
double height = data.Height;
SharpKml.Dom.Point myPoint = new SharpKml.Dom.Point();
myPoint.Coordinate = new Vector(lat, lon, height);
However the KML created does not have the right syntax
I get the following in the KML which is incorrect:
<when xmlns="http://www.opengis.net/kml/2.2">12:00:17 AM</when>
<gx:coord xmlns:gx="http://www.google.com/kml/ext/2.2">-81.3184973901226 29.0765012024324 50.5</gx:coord>
What is the proper way to add a time and coordinate to the SharpKML track?