Google Maps Hacks

by Rich Gibson and Schuyler Erle

This is a demo of the map in a box, or Map and HTML in the same Info Window. This came directly from John T. Guthrie, and is a copy of his map_in_box1.html file - posted with permission.

The counter in the infoWindow is important. Inside of the infoWindow, there is a <div> box that contains a blowup map. The counter enables us to create a <div> box with a different id each time that we click on the marker. If you don't do this, then for some reason unknown to me, the blowup map will appear in the infoWindow only for the first time that you click on the marker. (I guess it has something to do with objects being destroyed too soon, or something like that.) (Many thanks to over in Google-Maps-API discussion for coming up with the idea of putting a <div> box into the infoWindow.)

Questions? Send them to "maps at counterexample dot org". (You will need to undo the spam avoidance in order for that email address to work.)