Desktop version
Discussion about this site, including these forums (eg, suggestions, comments, queries). Topics may be manually deleted occasionally (eg, after suggestions dealt with, or changes bedded in).
Post a reply

Embedding Google Maps Directly in Forum Posts

Mon 08 Sep, 2008 11:09 am

I've figured out a way of embedding Google Maps directly into forum posts using a custom BBCode. Unfortuntately, it is not entirely trivial (but it's not difficult either).

Here's how it's done:
  • Use Google Maps to get the map you wish to embed.
  • On the Google Maps page with the correct map, click the 'Link' button just above the map (right side). This will show a drop down with two text fields.
  • Select and copy the text from the second field ("Paste HTML to embed in website" field).
  • Paste this text into a text editor (such as NotePad, TextEdit, vi, etc).
  • Delete all of the text except for the first URL (ie, the src="URL").
  • Do a search for all instances of "amp;" and delete them (Ie, change all occurrences of "&" to "&").
  • Select and copy the modified URL in your text editor.
  • Back here in the forums, click the "New Topic" or "Edit" button to get a forum post editing page.
  • Click the "map" button which should now appear near the righ end of the row of buttons above the editing area when composing/editing a forum post. This will paste the custom BBCode text into your post (around the selected text if any text is already selected).
  • Paste the modified URL into the forum post editor wrapped in 'map' and '/map' tags (but use SQUARE BRACKETS instead of quote marks).

See the next post for the exact text used to embed the map below.

The 'View Larger Map' link below each map links to a full page sized version of the map.


View Larger Map

Re: Embedding Google Maps Directly in Forum Posts

Mon 08 Sep, 2008 11:10 am

The exact text used to embed the map in the first post above is as follows in the code box (yes, the URLs are very long!):

Code:
[map]http://maps.google.com/maps?f=q&hl=en&geocode=&q=Derwent+Bridge+Tasmania+Australia&ie=UTF8&z=13&ll=-42.119617,146.237469&output=embed&s=AARTsJqDJ9MnzlAsB5gKCWZFCfS-3oEd_A[/map]


Note that the last sequence of characters in the URL appears to be a checksum of some sort, such that if you change other components of the URL, it does not work. This means that if you're not happy with your original map, and you want to change it, you have to go through the entire process again and generate a new map URL (inc, new checksum). You cannot just edit the URL, and change the "ll" values or the "q" value manually.

Re: Embedding Google Maps Directly in Forum Posts

Mon 08 Sep, 2008 11:44 am

Great stuff Nik,
A very handy addition to the forum
Post a reply