Embedding Google Maps Directly in Forum Posts

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).

Embedding Google Maps Directly in Forum Posts

Postby Son of a Beach » 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
Son of a Beach
Lagarostrobos franklinii
Lagarostrobos franklinii
 
Posts: 7023
Joined: Thu 01 Mar, 2007 7:55 am
ASSOCIATED ORGANISATIONS: Bit Map (NIXANZ)
Region: Tasmania
Gender: Male

Re: Embedding Google Maps Directly in Forum Posts

Postby Son of a Beach » 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: Select all
[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.
Son of a Beach
Lagarostrobos franklinii
Lagarostrobos franklinii
 
Posts: 7023
Joined: Thu 01 Mar, 2007 7:55 am
ASSOCIATED ORGANISATIONS: Bit Map (NIXANZ)
Region: Tasmania
Gender: Male

Re: Embedding Google Maps Directly in Forum Posts

Postby frank_in_oz » Mon 08 Sep, 2008 11:44 am

Great stuff Nik,
A very handy addition to the forum
Frank
Check out "Our Hiking Blog" Overland Track guide, Food to Go-recipe ideas and Trekking to Everest Base Camp.
User avatar
frank_in_oz
Athrotaxis cupressoides
Athrotaxis cupressoides
 
Posts: 372
Joined: Fri 02 Nov, 2007 12:43 pm
Location: Geelong, Vic


Return to Forum & Site

Who is online

Users browsing this forum: No registered users and 1 guest