Ignore empty gx:coord elements in kml files

This commit is contained in:
Andreas Voegele 2021-03-08 09:09:45 +01:00
parent fa38d19aff
commit 80ea50ff96

View file

@ -178,17 +178,19 @@
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<trkpt lon="{$lon}" lat="{$lat}"> <xsl:if test="$lon">
<xsl:choose> <trkpt lon="{$lon}" lat="{$lat}">
<xsl:when test="contains($latele,' ')"> <xsl:choose>
<ele><xsl:value-of select="substring-after($latele,' ')"/></ele> <xsl:when test="contains($latele,' ')">
</xsl:when> <ele><xsl:value-of select="substring-after($latele,' ')"/></ele>
</xsl:choose> </xsl:when>
<xsl:variable name="ts" select="../kml:when[$i]"/> </xsl:choose>
<xsl:if test="$ts"> <xsl:variable name="ts" select="../kml:when[$i]"/>
<time><xsl:value-of select="$ts"/></time> <xsl:if test="$ts">
</xsl:if> <time><xsl:value-of select="$ts"/></time>
</trkpt> </xsl:if>
</trkpt>
</xsl:if>
</xsl:for-each> </xsl:for-each>
</trkseg> </trkseg>
</trk> </trk>