A long time ago I thought it would be fun to open two windows and see two things on Google Maps next to each other. That way, I could compare the sizes of them. But getting the scale set the same on both maps was not easy. Wouldn’t it be neat if the scale of the maps was set to the same?
I finally got around to implementing this with Google Maps API:
To test it out, type “Liberia” in the left one. Then type “Switzerland” into the right one. Zoom one in and out and notice how the other one changes. You can also see the page alone in it’s own page.
As usual with Google maps apps, view source (in the iframe) to see how it’s done. The tricky bit is removing and adding the event handlers so that you do not create a notification loop. The auto-sizing code is nifty too, if I do say so myself.
Update: My good buddy Andrew pointed out that this has already been done.
Leave a Reply