Radar points out that you can now get a 'Lite' (my word not theirs) version of Google Earth as a plug-in for IE and FF on Windows only (boo!), more information over here. Which is, you know great. More-so this is the really exciting part, for me anyway ...
Google Earth, as an application is hard to script and make-do-stuff(tm), a very cursory glance at the Google Earth Plugin shows a different story.
First, make sure you have Firefox with Firebug installed, or just follow along with me, with pictures.
Then go here (on Windows, blah blah) to see an example page. You'll probably have to install the plugin and restart the browser. A quick view of the source-code gives us a few hints as to what to do.
Open up the console in Firebug and type "
ge" object is, you'll probably get a line afterwards like this ...
[xpconnect wrapped (nslSupports, IKmlLookAt, IKmlAbstractView ...]
... clicking that line will expand the whole object into the Dom, which will look something like this (only more) ...
... See, see all the lovely methods! I generally find this (initially) a far more interesting way to discover what methods can be used etc. when playing with new stuff, especially as the API docs are normally not fully there right at the start. The one I'm particularly interest in is the "
ge.createLookAt" method. Let's use that, again in the console type these 3 lines ...
var la = ge.createLookAt(''); la.set(51.503226, -0.118876, 100, ge.ALTITUDE_RELATIVE_TO_GROUND, 0, 0, 4000); ge.getView().setAbstractView(la);
They will, in turn...
- Create a LookAt object
- Set the target of the look at object, in this case the London Eye, in London
- Tell Google Earth Plugin to set the view to the LookAt object
And that's it. Whoo!
Or you could, you know, use the specially built sandbox to play with the methods that Google have, but where's the fun in that?
Tie in a little Ajax and there's no good reason why at the very simplest you can't have one person controlling the view for several people sitting at different machines (and yes I know you can sort of do this with Network Links in Google Earth, or normal Maps, but this has a certain immersive element to it).
Taking us all slightly closer to Snowcrash :)
Oh, and here's a dump of the LookAt Object ...
... and this is the stuff I was typing into the console to test things out, where I got the location of the London Eye wrong at least twice!