Chapter 15 — Introducing Google Earth 307
Within a folder, you add placemarks, and these are composed of further elements and defini-
tions that describe the placemark and its components.
Placemarks
The placemark is the primary method of highlighting information within a Google Earth
KML document. A placemark is a single entity within the Google Earth application and can
refer to a single point, a line, a route, a polygon, or any combination of these. For example, a
placemark could be your house, or it could be a re-creation of the stones at Stonehenge. Both
are single entities but are composed of one and many points and coordinates, respectively.
The points that you define as part of a placemark can consist not just of the latitude and longi-
tude, but also the altitude and even the relationship between the ground and your point on the
map. You can also add a custom icon to the placemark (just as with a GMarkerin Google
Maps).
Finally, you can control the appearance of the placemark, from the display text and information
panel to the name, style, and color of the label. You can also set the camera “view,” that is, the
location, altitude, direction, and tilt of the map when the user selects the placemark.
Geometry
Google Earth provides the ability to draw single points, lines, and polygons onto the map. All
geometry types consist of the coordinates (latitude, longitude), altitude, enabling points, lines,
and polygons to appear either on the ground or in the air. Coordinates are specified using the
coordinatestag, specifying the longitude, latitude, and altitude in that order. Hence, you
can find Sorrento using the KML:
All coordinates can be given a color, and polygons can be transparent (only their lines are
drawn) or solid (enabling you to construct buildings and other elements).
All points, lines, and polygons can be extruded; their location can be linked to another location.
For example, you can tether a coordinate to the ground even though it is displayed in the air.
For absolute flexibility you can group points, lines, and polygons into a collection, which in
turn can be used to describe single elements. For example, when constructing a building, you
could group the polygons that make up the building into a collection.
Overlays
Images can be overlaid on the map. Two types are available: a ground overlay and a screen over-
lay. Ground overlays ping the image to specific areas on the ground of the map. Screen overlays
enable you to “float” information in the Google Earth display.
The overlay image can be a JPG, PNG, GIF, or TIFF. You can either make the image available
over the Internet (or other network) or embed the image into a KMZ file along with the KML
file that uses it.