Fix #2359
This commit is contained in:
parent
29c13d40f8
commit
65d974c022
1 changed files with 16 additions and 10 deletions
|
@ -30,11 +30,9 @@
|
|||
<xsl:for-each select="//gx:Track">
|
||||
<trk>
|
||||
<trkseg>
|
||||
<xsl:for-each select="kml:when">
|
||||
<!-- Timestamp -->
|
||||
<xsl:variable name="ts" select="."/>
|
||||
<!-- Coordinates -->
|
||||
<xsl:variable name="lonlat" select="./following-sibling::gx:coord"/>
|
||||
<xsl:for-each select="gx:coord">
|
||||
<xsl:variable name="i" select="position()"/>
|
||||
<xsl:variable name="lonlat" select="."/>
|
||||
<xsl:variable name="lon" select="substring-before($lonlat,' ')"/>
|
||||
<xsl:variable name="latele" select="substring-after($lonlat,' ')"/>
|
||||
<xsl:variable name="lat">
|
||||
|
@ -48,7 +46,15 @@
|
|||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<trkpt lon="{$lon}" lat="{$lat}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($latele,' ')">
|
||||
<ele> <xsl:value-of select="substring-after($latele,' ')"/></ele>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:variable name="ts" select="../kml:when[$i]"/>
|
||||
<xsl:if test="$ts">
|
||||
<time><xsl:value-of select="$ts"/></time>
|
||||
</xsl:if>
|
||||
</trkpt>
|
||||
</xsl:for-each>
|
||||
</trkseg>
|
||||
|
|
Loading…
Reference in a new issue