Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

320 Part IV — Google Earth Hacks


Using the script in Chapter 11 that adds new entities to the database, Saddler’s, Shoe Shops,
and Stationers have been added to the database. Figure 16-7 shows the new changes after the
automatic reload.

FIGURE16-7: Automatic reload of KML data.

In this example, the data is unlikely to be reloaded and regenerated so regularly, but the refresh
system can be used to help regenerate all sorts of information. For example, KML could be
generated to show the current location of an aircraft or a team on an expedition. Each reload
would update the position accordingly.

Creating a Self-Reloading KML File
Not only can this be controlled from within the Google Earth application, but you can set the
refresh parameters from within a KML file. You cannot set it in the file that you generate, but
you can instead generate a static KML file that refers to the dynamic KML file and includes
the refresh parameters.

Following is a sample of the KML file, designed to refresh the dynamic example:
Free download pdf