Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

Chapter 16 — Generating Google Earth Feeds 313




...

Travel Quest
8-9 Westgate,Grantham, NG31 6LT, United ;
Kingdom


-0.643614,52.9119,0



Voyager
99 Westgate,Grantham, NG31 6LE, United ;
Kingdom


-0.644091,52.9119,0



Quality Travel
50 East St,Grantham, NG31 6QJ, United Kingdom


-0.640053,52.9121,0



Global Flights
99 Westgate,Grantham, NG31 6LE, United ;
Kingdom


-0.644091,52.9119,0





If you save the file (for example, using redirection) and then open the file within Google Earth
(by selecting File➔Open), you get a window similar to the one shown in Figure 16-1.


You can see that Google Earth has zoomed to a point that shows all the loaded
tags. You can also see, in the panel on the left, that the folders you created within the KML are
displayed. Unlike Google Maps, where individual business types had to be enabled and dis-
abled through a JavaScript function you created, Google Earth now handles the selection pro-
cess for you. Figure 16-2 shows just banks and restaurants displayed on the map.


Of course, generating a static file and distributing it is not particularly efficient, especially if the
data changes frequently.

Free download pdf