Embedding Google Maps in vBulletin (BBCode)
Posted May 1st, 2008 @ 08:50am by Erik J. Barzeski
Has anyone seen a method for embedding a google map into a vBulletin forum via bbcode? I've yet to see one, and the ones I've tried to make myself fail miserably. Either they're too complex, you can only have one per page (which messes up people who might quote the map or wish to embed more than one map), or the site blows up when someone has JavaScript disabled… something goes awry every time.
Anyone? Bueller? Bueller?


Donate Life
Posted 03 May 2008 (2 weeks ago) at 12:46pm #
I don't know much about vBulletin, but it seems like your best bet would be to use the Static Maps API, assuming a static map is sufficient for you:
http://code.google.com/apis/maps/documentation/staticmaps/index.html
It's just an IMG tag (or whatever the BBCode equivalent is).
Posted 03 May 2008 (2 weeks ago) at 1:36pm #
Mike F said on May 3, 2008:
Thanks, I've built that. Unfortunately it doesn't seem to allow you to choose between the "mappy" view and the "satellite" view. For the forum, a satellite view is often the preferred method of showing a map because usually we're looking at a golf course or something.
Good idea, though. Thanks.
Posted 03 May 2008 (2 weeks ago) at 6:03pm #
Couldn't your users embed an iframe of the google map? You could write something that took the Google Map iframe URL, parsed it and created a custom "google map tag". Then when you render the post, transform that back to the iframe.
Posted 03 May 2008 (2 weeks ago) at 8:22pm #
EJ said on May 3, 2008:
Perhaps. I'll have to look at that. You can't really "parse" anything with a bbcode, but you could just take a URL and use it as the source of an iFrame, probably. If you're allowed to do that, of course. Google might not allow off-site use in that manner. I'll look into it.