Mac users suddenly have plenty to rejoice about. What happened?
Craig Stanton — he of iPhotoToGoogleEarth fame — just discovered that Google Earth 4 has a basic AppleScript library!
This opens up all sorts of possibilities. For Craig, it allowed him to build what is perhaps the simplest, most intuitive georeferencing application on any platform: Geotagger.
How does it work?
- Position Google Earth over the spot where you took a photo. (Need some crosshairs?)
- In your finder, drag the photo to the Geotagger droplet.
Done. Geotagger uses AppleScript to read the position of the center of the screen in Google Earth, and adds this to the EXIF metadata of the photo(s) you dropped on it. You can now import these photos into Flickr or Panoramio, where they will be automatically geotagged. If you import these photos into iPhoto, you can use Craig’s iPhotoToGoogleEarth plugin to export them as KML. Only caveat: The photos need to be JPEGs.
Being able to commandeer Google Earth via AppleScript really opens up a Pandora’s box for Mac users. Check out the commands:
I had hopes for AppleScript support when GE3 came out for the Mac because I really wanted to build a remote control for Google Earth using my Bluetooth enabled mobile phone and fellow Stockholmer Jonas Salling’s Salling Clicker. Now that’s possible. Here’s the proof, taken outside on Stockholm’s Odenplan last night:
(Geeknotes: The mobile phone in the video is acting as the Mac’s 3G modem via Bluetooth while also simultaneously relaying commands via Bluetooth using Salling Clicker. No, that’s not why it crashed — the current Google Earth 4 Mac beta is a tad unstable if you as much as breathe on the preferences file.)
If you have Salling Clicker, you can download the file containing my (very simple) AppleScript commands for Google Earth. Treat it as a proof of concept; you’ll have to attach the scripts to phone keys yourself. I’m sure AppleScript gurus have ways of turning this into a more polished product.
I can’t wait for increased AppleScript support by Google Earth in the future. Imagine geocoding placenames via AppleScript, or taking screenshots of your house as wallpaper for your mobile phone, or letting GPS devices and location-aware mobile phones show you where you are in Google Earth. In fact, some of these things should even be possible with the current AppleScript library. Apple users, your Google Earth API has arrived.