Merge pull request #11083 from voegelas/ignore-empty-gx-coord

Ignore empty gx:coord elements in kml files
This commit is contained in:
vshcherb 2021-03-08 15:45:21 +01:00 committed by GitHub
commit 893ef334a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,17 +178,19 @@
</xsl:otherwise>
</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:if test="$lon">
<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:if>
</xsl:for-each>
</trkseg>
</trk>