Tuesday, August 21, 2007

Easily Embed Google Maps with HTML

Google Maps has released a new feature that lets you embed any Google Map into a web page using straight HTML -- no JavaScript or API key required. It works for address, or business search results:

View Larger Map

As well as fully interactive My Maps maps (this map shows the cricket stadiums used in World Cup 2007):

View Larger Map

This is really useful, there's plenty of times when a map would be the perfect thing to illustrate a point online, but setting up a 'real' mashup is just overkill.


  1. Anonymous2:32 pm BST

    The first thing that came to my mind when I read about the new embedding feature in Google Maps, was that it could be used to embed a map on my blog that has my geotagged photos on it.
    Appeantley, this is one of the major potential uses that google thought about as well. I'm basing this on the following paragraph from a google announcement about the embedding feature:
    "Users will find this feature helpful in many ways. For example,
    - individuals can update their personal websites by publishing maps of geotagged vacation photos or creating sophisticated maps mashups using the simple tools available in the My Maps tab."
    This is a quote from a Google e-mail sent to and published by Ogle Earth.

    So google wants you to use their MyMaps feature to manually create a map with your photos, and then embed that on your site. This could be done much more easily using google's own Picasa Web Albums. Currently, the Picasa desktop application lets you geotag your images. When you upload them to Picasa Web Album, you can view all the geotagged photos in your album by selecting "Map View." This will show your photos on a google map, but without the "Link to this page" button. So you can only view your automatically made map with geotagged photos on Picasa Web Albums, but you can't embed that map since it doesn't have that button.
    If google doesn't want the "Link to this page" button on Picasa Web Albums, an alternative would be to offer to create a MyMap from an existing Picasa Web Album. Meaning, you would go to Google Maps, chose to create a MyMap, but instead of using the placemark tools to create it, you would specify you want it to import a map from Picasa Web Albums.
    So either the Google Picasa Web Albums guys take the embedding "technology" from the Google Maps guys, or the Google Maps guys need to take the automatically created geotagged photos map from the Picasa Web Albums guys. But either way, these guys need to talk to each other!

    By the way, I did come up with a workaround to do this by yourself. In Picasa Web Albums, after selecting to view an album in "Map View," there is an option to select to view your photos in Google Earth. This will open up a KML file. Instead of opening that file, right click that link and copy that auto-generated KML file's address. Then, go to Google Maps and paste that address in the Search box (this is the way to open KML files in Google Maps). This will open up your Picasa Web Albums Map inside Google Maps, and then you could click on the embedding button to get the embedding source code.

    Is there someone who can get the word out to Google and tell them how quickly they could fix this and save their users the time to manually create maps with photos to put on their blogs?

  2. Really useful. Easy to embed in any blog and customizable, but still I don't see why it hasn't been implemented into Picasa. At least Panoramio's blog describes how-to. Anyway thanks to Johnny for the trick on embeding Picasa Web Albums.

  3. Anonymous9:57 am GMT

    Hey thanks for figuring this out! I wonder why the G-men haven't already enabled this...