Google Maps/POIs.kml.xsl: Unterschied zwischen den Versionen
Aus Geoinformation HSR
Stefan (Diskussion | Beiträge) (Die Seite wurde neu angelegt: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns="http://earth.google.com/kml/2.1" xmlns:xsl="http://www.w3.org/1999/XSL/T...) |
Stefan (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
− | + | <code> | |
− | |||
− | |||
− | |||
− | |||
− | <xsl:template match="/"> | + | <?xml version="1.0" encoding="UTF-8"?> |
− | + | <xsl:stylesheet version="1.0" | |
− | + | xmlns="http://earth.google.com/kml/2.1" | |
− | + | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
− | + | <xsl:output method="xml" indent="yes"/> | |
− | + | ||
− | + | <xsl:template match="/"> | |
− | </kml> | + | <kml xmlns="http://earth.google.com/kml/2.1"> |
− | </xsl:template> | + | <Document> |
+ | <name>My POIs</name> | ||
+ | <description>My Points of Interest (Source: from EditGrid.com)</description> | ||
+ | <xsl:apply-templates/> | ||
+ | </Document> | ||
+ | </kml> | ||
+ | </xsl:template> | ||
+ | |||
+ | <xsl:template match="sheet"> | ||
+ | <name>POIs</name> | ||
+ | |||
+ | <xsl:for-each select="row"> | ||
+ | <xsl:if test="position() > 1"> | ||
+ | |||
+ | <Placemark> | ||
+ | <name> | ||
+ | <xsl:value-of select="cell[@col=2]/@value"/> | ||
+ | </name> | ||
+ | <description> | ||
+ | <xsl:value-of select="cell[@col=3]/@value"/> | ||
+ | </description> | ||
+ | <Style> | ||
+ | <IconStyle> | ||
+ | <Icon> | ||
+ | <href>http://maps.google.com/mapfiles/kml/pal2/icon13.png</href> | ||
+ | </Icon> | ||
+ | </IconStyle> | ||
+ | </Style> | ||
+ | <Point> | ||
+ | <extrude>0</extrude> | ||
+ | <altitudeMode>absolute</altitudeMode> | ||
+ | <coordinates><xsl:value-of select="cell[@col=1]/@value"/>,<xsl:value-of select="cell[@col=0]/@value"/>,0</coordinates> | ||
+ | </Point> | ||
+ | </Placemark> | ||
+ | <xsl:text> | ||
+ | | ||
+ | </xsl:text> | ||
+ | </xsl:if> | ||
+ | </xsl:for-each> | ||
+ | </xsl:template> | ||
+ | |||
+ | </xsl:stylesheet> | ||
− | + | </code> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Version vom 22. August 2007, 16:25 Uhr
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns="http://earth.google.com/kml/2.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <kml xmlns="http://earth.google.com/kml/2.1"> <Document> <name>My POIs</name> <description>My Points of Interest (Source: from EditGrid.com)</description> <xsl:apply-templates/> </Document> </kml> </xsl:template> <xsl:template match="sheet"> <name>POIs</name> <xsl:for-each select="row"> <xsl:if test="position() > 1"> <Placemark> <name> <xsl:value-of select="cell[@col=2]/@value"/> </name> <description> <xsl:value-of select="cell[@col=3]/@value"/> </description> <Style> <IconStyle> <Icon> <href>http://maps.google.com/mapfiles/kml/pal2/icon13.png</href> </Icon> </IconStyle> </Style> <Point> <extrude>0</extrude> <altitudeMode>absolute</altitudeMode> <coordinates><xsl:value-of select="cell[@col=1]/@value"/>,<xsl:value-of select="cell[@col=0]/@value"/>,0</coordinates> </Point> </Placemark> <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </xsl:template>
</xsl:stylesheet>