Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

Chapter 15 — Introducing Google Earth 305


The format of the data is not very difficult to understand or generate. Many of the principles
that have been used through the rest of the book, such as specifying the latitude and longitude
of a point and adding icons and other data, should be familiar. Unlike Google Maps, where the
applications that build and overlay this information on the map had to be encoded, the exten-
sion method within Google Earth is provided entirely within the structure and format of the
KML files.


This section looks at some of the basics of the KML system.


Exporting Your Tags


The easiest way to generate and share points, routes, and other data within Google Earth is to
save the points you find and put them into your My Placesfolder (or another folder you cre-
ate). You can then save the folder contents into a KML or KMZ file (a Zipped version of a
KML file) that you can then share with other people by simply distributing the file. You can
see the result of the KML file generated during the earlier examples here:


<?xml version=”1.0” encoding=”UTF-8”?>




My Places.kml

My Places
1

Seattle, WA, USA
Seattle, WA, USA

root://styleMaps#default+nicon=0x304+hicon=0x314

-122.330833,47.606389,0



New York, NY, USA
0
New York, NY, USA

root://styleMaps#default+nicon=0x304+hicon=0x314

-74.006389,40.714167,0



Ambleside, LA22, UK
0
Ambleside, LA22, UK

root://styleMaps#default+nicon=0x304+hicon=0x314

-2.9623,54.428376,0

Free download pdf