An article on Ogle Earth alerts us to a neat trick to get a location from Google Maps to Google Earth. Simply add ‘&output=kml’ to the URL of the map you are viewing, (be sure to click the ‘Link to this page’ on the map first!). I created this simple javascript gMaps2kml bookmarklet, that seems to do the trick, so drag it to your bookmark bar and enjoy*.
Unfortunately, I have problems with getting this to work in Firefox (1.5) whether I use the bookmarklet or manually paste the parameter. It always generates the same kml file of a location in New York. Safari, Opera and Camino don’t have this problem! I’ll have to keep you posted of this one. A friend with a similar setup doesn’t have the same problem – might be a firefox extension issue.
* Note: that the resulting kml files are simply called ‘maps’ with no extension, so this may cause you grief, but it’s easily fixed by adding the extension.
Update: Barry Hunter over at nearby.org.uk, who originally documented the hack, has improved on my bookmarklet, by searching the DOM for the ‘link’, so you don’t have to click ‘Link to this Page’ anymore. He’s posted it in a comment below, but I’ll put it here as well. gMaps2kml2. Isn’t that neat?