View Full Version : Google Maps added a tab and scrunged my popups
kitchin
04-05-2007, 07:43 PM
Google Maps has added a new tab called "My Maps." The problem is, now the "link to this page" URL on the right links to a page with a lot of white space on the left. This has broken the look of my map popup windows (all the extra space on the left), since I just use that URL. So do I have to learn the Google Maps API, or does somebody know a magic parameter to suppress the lefthand sidebar area? It's abut 340 pixels wide on my computer.
Andilinks
04-05-2007, 11:05 PM
Here's a partial or flawed solution, maybe you can play with it some more. On the same line as the "Link to this page" link there is a "Print" button. If you use that URL it will pop-up the map without the sidebar. Unforunately it also calls up the Print dialog box which then must be cancelled. At the end of that URL is &pw=2. I've tried many numeric variations of that "pw" value, none yet supress the print dialog box. Numeric values all return the print box, alpha values return the sidebar...
If there's a solution it may be down that path. Oh well, I tried. :)
Andi
kitchin
04-06-2007, 01:21 AM
Thanks
kitchin
04-22-2007, 10:31 AM
I wrote a solution for this using the Google Maps API. A few issues came up...
1. I switched from popups to a link that opens a hidden <div> in the page. Easier than dealing with javascript-disabled cases. And Mozilla broke my home links from within popups: target="_blank" no longer breaks out of the popup.
2. The Google Maps API has some bugs that make IE7 popup warnings if you aren't careful. A discussion post said to change "GUnload()" to "try { GUnload() } catch(e) {}" and that worked. Also, the map variable must be global, not within a function, in case the user clicks on the link more than once. Otherwise, another IE7-only warning.
I have the PHP code if anyone wants it. It parses the "link to this map" link and creates a Google Maps API div link. It's very easy to get a key from Google, you get it back immediately.
vBulletin® v3.6.8, Copyright ©2000-2010, Jelsoft Enterprises Ltd.