How to draw path between placemark

kml
Luc picture Luc · Mar 30, 2011 · Viewed 10k times · Source

I'm new on kml and do not find the way to create a paths between several placemark (each with some coordinate, a name, description). I checked kml tutos but did not find this.

Any ideas ?

Answer

tony gil picture tony gil · Jun 2, 2012

create a LineString element with the same coordinates (Longitude, Latitude, Altitude) as your Points.

<Folder>
    <description>Frankie likes walking and stopping</description>
    <Placemark id="track1">
        <name>frankies path</name>
        <LineString>
            <coordinates>-46.67,-23.58,100 -46.754,-23.666,100 -46.6616,-23.5632,100 </coordinates>
        </LineString>
    </Placemark>

    <Placemark>
        <name> 2012-05-31 17:23:09</name>
        <description> Stop TIME: 19:25:20 Source: network</description>
        <Point>
            <coordinates>-46.67,-23.58,100 </coordinates>
        </Point>
    </Placemark>
    <Placemark>
        <name> 2012-05-31 17:23:09</name>
        <description> Stop TIME: 03:01:59 Source: gps</description>
        <Point>
            <coordinates>-46.754,-23.666,100 </coordinates>
        </Point>
    </Placemark>
    <Placemark>
        <name> 2012-05-31 17:23:09</name>
        <description> Stop TIME: 02:26:13 Source: network</description>
        <Point>
            <coordinates>-46.6616,-23.5632,100 </coordinates>
        </Point>
    </Placemark>
</Folder>