Skip to content

Infobar timestamp displays "undefined" with KML tracking #34

@Embret

Description

@Embret

When using the infobar with KML tracking the timestamp value displays "undefined". Coordinates are displaying as expected.

My page shortcode: [tsmap live=y points=y infobar=y height=640px kml=proxy:https://share.garmin.com/Feed/Share/vandrerblogg?d1=2021-07-13T06:19z&d2=2021-07-28T23:59z]

My shortcode infobar template looks like "Siste spor - Tidspunkt: {timestamp} - Koordinater: {lat},{lon}"

My map infobar displays like this:
image

Here is the KML data of the last track i receive from the garmin link in the shortcode:

      <Placemark>
        <name>Magnus Embret Henriksen</name>
        <visibility>true</visibility>
        <description />
        <TimeStamp>
          <when>2021-07-27T13:44:15Z</when>
        </TimeStamp>
        <styleUrl>#style_2049742</styleUrl>
        <ExtendedData>
          <Data name="Id">
            <value>38201770</value>
          </Data>
          <Data name="Time UTC">
            <value>7/27/2021 1:44:15 PM</value>
          </Data>
          <Data name="Time">
            <value>7/27/2021 3:44:15 PM</value>
          </Data>
          <Data name="Name">
            <value>Magnus Embret Henriksen</value>
          </Data>
          <Data name="Map Display Name">
            <value>Magnus Embret Henriksen</value>
          </Data>
          <Data name="Device Type">
            <value>inReach Mini</value>
          </Data>
          <Data name="IMEI">
            <value>300434035412970</value>
          </Data>
          <Data name="Incident Id">
            <value />
          </Data>
          <Data name="Latitude">
            <value>69.712221</value>
          </Data>
          <Data name="Longitude">
            <value>22.239118</value>
          </Data>
          <Data name="Elevation">
            <value>118.34 m from MSL</value>
          </Data>
          <Data name="Velocity">
            <value>5.0 km/h</value>
          </Data>
          <Data name="Course">
            <value>247.50 ° True</value>
          </Data>
          <Data name="Valid GPS Fix">
            <value>True</value>
          </Data>
          <Data name="In Emergency">
            <value>False</value>
          </Data>
          <Data name="Text">
            <value />
          </Data>
          <Data name="Event">
            <value>Tracking message received.</value>
          </Data>
          <Data name="Device Identifier">
            <value />
          </Data>
          <Data name="SpatialRefSystem">
            <value>WGS84</value>
          </Data>
        </ExtendedData>
        <Point>
          <extrude>false</extrude>
          <altitudeMode>absolute</altitudeMode>
          <coordinates>22.239118,69.712221,118.34</coordinates>
        </Point>
      </Placemark>

Is there anything i can do to get the timestamp to show the time of the last KML track?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions