Ignore empty gx:coord elements in kml files
This commit is contained in:
parent
fa38d19aff
commit
80ea50ff96
1 changed files with 13 additions and 11 deletions
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue