Embed a "My Map" in Google Sites

The My Maps mentioned in this article is no longer available. 

This article is only exists now, for historical reference

The Tip shown in this page no longer works. Google Maps no longer supported automated 'Gadgets', which this exploited.

Google Sites now seem to provide an Official method anyway, see

The text below remains solely as historical reference.


Note: Since this was originally created it's been noted that the map is hard-coded as being 200px high, so if want other dimensions, best to use the alternative method below. 

(the below is reposted from a forum post)

As far as I know Google Gadgets are supported on sites, so you could 
package up your Map into a Gadget and embed that. 

.... then a bit later... 
Just realised Google have a script to automatically make a compatible Gadget for you! I also made a script that can be used to build the correct URLs, to be able to use it easily. A) Go to your My Map, and Right click the  View in Google Earth icon and copy the link to the clipboard (the exact menu option varies per browser) B) Go to http://www.nearby.org.uk/gadget-for-kml.php
C) Paste the url you copied earlier INTO the 'KML URL' box in step 1; and click Update. D) As you want to use the Google script* (its good enough to use a My Map), in Step 4, click "click here to use direct in step 6" E) Scroll down to step 6. and select and copy the whole contents of the 'XML URL' box. F) Go to sites, and edit your page, then click 'Insert' and select 'More...' in the Gadgets section. G) on the pop up, click 'Add by URL' and paste in the XML URL you just copied. Example: http://sites.google.com/site/barrybhunter/maptest from the original map: http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=103387750622659154041.00045e6c12a1cc165d6ee (Note: the script on Nearby is just a utility script to help create the correct URLs needed, the map is powered totally off Google services) (* you could instead use the manual SpecMaker, but it will be more fiddly; you have to host the XML file somewhere - and doesn't really give you any useful options over the automatic one in this case) --- barryhunter

An alternative, which allows embedding of a 2D (Google Maps) or 3D (Google Earth) based map:

You can embed this XML url:

as in steps F) & G) above. And then goto the gadget options window, and use the KML url retrieved in the same was as in A) above.