Easily Add Google Maps To Your Site With New Embed Code

Google Maps is now offering some YouTube-style embed code which finally gives non-programmers an easy way to add maps to nearly any webpage. The new code can be found under the “Link to this page” option at the top of any map on the site. The resulting map is fully interactive with pan and zoom […]

Gmapsembed
Google Maps is now offering some YouTube-style embed code which finally gives non-programmers an easy way to add maps to nearly any webpage. The new code can be found under the “Link to this page” option at the top of any map on the site.

The resulting map is fully interactive with pan and zoom controls as well as map, satellite and hybrid view options. Each embedded map also contains a link back to the original Google Maps page. The embedded maps can be customized to any size and if you have markers on your map, they will show up in the embedded version as well.

The only catch is that the Google Maps code uses an iFrame to load content which means it won't work on nearly as many sites as YouTube's Flash embed code. Many hosted pages — like MySpace — often don't allow iFrames, which means this new embed code isn't going to help you.

Still, for many, this opens up a whole new world of maps. Previously embedding Google maps in your page required some programming skills and you needed to register for an API key, which prevent casual users from embedding maps in blogs and other places. And even if you're a regular user of the Maps API, the new embed method is a lot simpler for something like a quick map in a blog post.

Interestingly, Yahoo, which uses Flash for the latest version of its mapping service, and could — at least theoretically — offer an embeddable Flash movie that would work anywhere, thus far hasn't offered anything of the kind.

Here's an example of the the Google Maps embed code in action:

View Larger Map

[Sidenote for the nerds amoung us: if you look at the embed code Google provides you'll see the URL that the iframe is pulling in, with a little cut-n-paste you can create a link to a pure map page like this. The URL you want is the one that ends with "&output=embed."]