Google Earth for Mac + AppleScript = Geotagger! (and more!)

Mac users suddenly have plenty to rejoice about. What happened?

geotaggericon.jpgCraig 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?

  1. Position Google Earth over the spot where you took a photo. (Need some crosshairs?)
  2. 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.

16 thoughts on “Google Earth for Mac + AppleScript = Geotagger! (and more!)”

  1. The QT video appears as a big ? on my screen. I’m running QT Pro 7.1.3 on OS X 10.4.7 on Intel. It should all work.

    Also “dowload” looks better if spelled “download” :=)

  2. Well, it’s embedded YouTube code, and I can see it in both Firefox and Safari on my Mac with same specs. Can you see other embedded YouTube content?

  3. Pandora’s box indeed: we’ve had our own minor headaches with cross-platform issues between Mac and Windows, and as developers dive into the Windows API and now AppleScript, the experience of missing out on “something cool in Google Earth” because it’s only been tricked out on a particular platform, well, I guess it’s a part of growing up.

    Personally I think there’s tremendous growth potential in providing an informative, pleasurable, repeatable experience without worrying about what OS, Service Pack, or obscure .dll the end user may or may not have. So while I applaud creativity in extending the usefulness of GE, I feel a faint queasiness when said innovation is limited to a specific platform.


    p.s. None of the above should be construed as interest in engaging in a Mac vs. Windows vs. Linux debate….

  4. Stefan, you are right, it is the use of YouTube (and therefore Shockwave) that is preventing the movie from showing on my Intel iMac. QuickTime would be fine, but shockwave is not.

    Adobe’s site says “Shockwave Player has not yet been ported to run natively on the new Intel-based Macintosh computers and currently only runs in Rosetta emulation mode. To install and use Shockwave Player on an Intel-based Macintosh, you will need to run the browser in Rosetta emulation mode. Follow the instructions below to launch your browser in Rosetta emulation mode.”

  5. Very interesting Adam. I had seen your Blojsom scripts but somehow assumed you were using the Finder’s screenshot capture command. I should pay more attention:-)

  6. Thanks for the Geotagger link. Have you seen JetPhoto? This sets up photo galleries and connects with Google Earth (seems to work fine with Geotagger) and Flickr.

  7. hello,

    pl inform how to download google earth for nokia 9300

    hope to do needful

    thanking u

  8. this is a really fantastic development! I’m trying to work with the new applescript library, but I can’t seem to specify the “speed” property of the SetViewInfo command correctly… It just snaps to new location instantly. Does anyone on here have any ideas? They would be so so so appreciated!

    tell application “Google Earth”

    SetViewInfo {







    end tell

    thanks again!


  9. “speed” is not a member of the viewinfo record–it is a separate optional parameter:

    tell application “Google Earth”

    SetViewInfo {latitude:40.0624, longitude:-105.192825, distance:4209.0, tilt:0.0, azimuth:0.0} speed 0.2


    end tell

  10. Hi,

    I think you’d better assign keypad for scripts you created to make it easier to navigate in Google Earth using mobile phone.

    As for me:

    Joystick up/down/left/right/push: GE-up/down/left/right/stop

    2/8/4/6: Tilt-up/down/left/right

    1/3: zoom in/out

    5: point north

    0: look straight down

    After make that tiny changes, the navigation is much easier.

    Anyway, thanks so much for your script file.

  11. COOL! Awesome, but salling clicker costs a fortune (for me) and for some kind of reason, google earth 5 have lost’s it’s scripting ability, so I have to re-download google earth 4 again for the script to work. Thanks

Comments are closed.