A great hint from Nearby.co.uk‘s Barry Hunter on Google Earth Community: You can append “&output=kml” to any Google Maps URL to have Google return a placemark in a KML file that opens automatically in Google Earth. This appears to be an undocumented feature — Google Maps’ API pages don’t appear to have it.
For example, here where I live in Stockholm, more or less, in Google Maps.
That’s using the URL you get by clicking on “Link to this page” in Maps. Now here is where I live in Stockholm in Google Earth.
Barry’s suggested query format in his hint returns a more verbose page in Google Maps.
And if you append “&output=kml”, the KML returned is also more descriptive with a link back to the Maps version.
Experimenting a little, it turns out that by using Barry’s format, you can have Google Earth fly to any address or place name its database knows. For example, Berlin, Germany in Maps (look, no coordinates). Berlin, Germany in Google Earth (again, no coordinates).
I haven’t found a way to encode views in a query, so your Google Earth view is always from above.
What’s so new about this? Generating KML from a server query has certainly been done before — in fact, it was Ogle Earth’s very first mashup, back in July 2005 (direct link. You can also use it via yubnub.) The problem with running PHP off www.ogleearth.com is that it is not exactly scalable if everybody uses it. But appending “&output=kml” to Google Maps is.
Finally, the caveats: This method also still pollutes your desktop/download area with KML files, and it isn’t a “transparent” solution, in the sense that we’re mixing magisteria here, piggybacking on web protocols to get to Google Earth’s coordinate space. But it’s the closest yet to linking seamlessly from the web to Google Earth.
[Update 2006-04-25: Barry tells how he found this hack.]