306 Part IV — Google Earth Hacks
<Placemark>
<name>Ben Nevis, UK</name>
<visibility>0</visibility>
<address>Ben Nevis, UK</address>
<styleUrl>root://styleMaps#default+nicon=0x304+hicon=0x314</styleUrl>
<Point>
<coordinates>-5.003529,56.796859,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>sorrento</name>
<open>1</open>
<View>
<longitude>14.366667</longitude>
<latitude>40.616665</latitude>
<range>31855</range>
<tilt>0</tilt>
<heading>0</heading>
</View>
<styleUrl>root://styleMaps#default+nicon=0x304+hicon=0x314</styleUrl>
<Point>
<coordinates>14.366667,40.616665,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Seattle, WA, USA</name>
<open>1</open>
<address>Seattle, WA, USA</address>
<styleUrl>root://styleMaps#default+nicon=0x304+hicon=0x314</styleUrl>
<Point>
<coordinates>-122.330833,47.606389,0</coordinates>
</Point>
</Placemark>
</Folder>
</Document>
</kml>
The structure and content of the file is, as you can see, very simple and doesn’t differ in many
respects from some of the XML documents that you used in examples earlier in this book.
Basic KML Principles
The KML standard is huge. Google’s own documentation on KML is almost 120 pages, and
the contents are not going to be reproduced here. Instead, look at the highlights and key
points, starting with the basic format of a KML file. The basis of the KML file structure is as
follows:
The main KMLXML root tag.
The Documenttag defines the content of the document (and contains global document
information and a number of folders).
The Foldertag defines the contents of a single folder, with each folder containing the
details of one or more placemarks, routes, or other structures.