Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

Chapter 7 — Extending the Google API Examples 127


}

//]]>













The difference between the two scripts (aside from the code for adding the markers in the first
place) is this line:


earth.addOverlay(marker);


This line simply adds the marker to the Earth map, as well as to the Maps map. An example of
the application is shown in Figure 7-13.


FIGURE7-13: Adding markers to multiple maps.

Free download pdf