Hacking Google Maps and Google Earth (ExtremeTech)
Chapter 7 — Extending the Google API Examples 115 var point = new GPoint(parseFloat(x),parseFloat(y)); map.addOverlay(new GMarke ...
116 Part II — Instant Gratification Using a single polyline, you can map a distance or length, or show the relationship between ...
Chapter 7 — Extending the Google API Examples 117 map.addOverlay(new GMarker(point)); } //]]> As you can see, the core of th ...
118 Part II — Instant Gratification Adding a Route Adding a route is much the same as adding a bounding box: You build an array ...
Chapter 7 — Extending the Google API Examples 119 Obviously, this is a less-than-efficient method of adding a route to the map, ...
120 Part II — Instant Gratification Opening an Info Window When you added markers to the map to indicate the location of differe ...
Chapter 7 — Extending the Google API Examples 121 The key to the example is the use of GEvent. This function makes the Google Ma ...
122 Part II — Instant Gratification FIGURE7-11: An info window after a user has clicked a marker. Because the information in the ...
Chapter 7 — Extending the Google API Examples 123 Event Listeners Events can be used to add interesting effects to a map. There ...
124 Part II — Instant Gratification Listing 7-10 (continued) map = new GMap(document.getElementById(“map”)); map.centerAndZoom(n ...
Chapter 7 — Extending the Google API Examples 125 FIGURE7-12: Synchronizing map display using listeners and events. The example ...
126 Part II — Instant Gratification Listing 7-11: Adding Overlays to Multiple Maps <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1 ...
Chapter 7 — Extending the Google API Examples 127 } //]]> The difference between the two scripts (aside from the c ...
128 Part II — Instant Gratification Clicking either marker will bring up an info window. However, the listener for opening the w ...
Chapter 7 — Extending the Google API Examples 129 </script> </head> <body onload=”onLoad()”> <div id=”map” ...
130 Part II — Instant Gratification This application is incredibly useful. In fact, it was invaluable to me when preparing this ...
Chapter 7 — Extending the Google API Examples 131 You can see a screenshot of the application in action in Figure 7-15, although ...
...
Discovering Overlays and Mash-ups T wo common techniques for increasing functionality in Google Maps applications are overlays a ...
134 Part II — Instant Gratification Integrating the original street map with an overlay of the transit map can make understandin ...
«
3
4
5
6
7
8
9
10
11
12
»
Free download pdf