Set Location of Evernote Items with Google Earth


Here's a basic utility script which allows you to set the location the currently selected note in Evernote via the Google Earth app. Once you've selected your location in Google Earth, just highlight the item in Evernote that you'd like to add location data to and run the script. The script takes the latitude/longitude of the currently selected location in Google Earth and adds it to your note. I see this being used in a number of interesting ways which I will present in a more detailed walk-through (probably along with some other Google Earth/Evernote scripts) -- but here's one as an example: While preparing for a trip, I'd use this to tag notes with a specific location. I could tag a note containing my hotel confirmation information or maybe a review of a restaurant by their address, a Wikipedia article about a landmark.... you get the idea. When I'm there and "on the go", I can then use Evernote's iPad or iPhone clients to quickly show me all of the notes about items near my current location! At some point, I'm sure that the Evernote application will have a built-in method for adding address data to your notes but, until then, it's AppleScript to the rescue!

The Code

Set Location of Evernote Items with Google Earth
Version 1.0
September 23, 2010
Project Status, Latest Updates, and Comments Collected at:

property lat : ""
property long : ""
my getGoogleEarthCoordinates()

tell application "Evernote"
    set theSelection to selection
    repeat with i from 1 to (length of theSelection)
        set theItem to item i of theSelection
        set latitude of theItem to lat
        set longitude of theItem to long
    end repeat
end tell

on getGoogleEarthCoordinates()
    tell application "Google Earth"
        set viewInf to GetViewInfo
        set coords to {latitude of viewInf, longitude of viewInf}
    end tell
    set long to (text item 2 of coords)
    set lat to (text item 1 of coords)
end getGoogleEarthCoordinates

4 Responses to “Set Location of Evernote Items with Google Earth”

  1. Chriz October 3, 2010 at 7:19 am #

    This is so cool… thank you for sharing!

    • Justin Lancy October 6, 2010 at 12:34 am #

      Happy that it helped!

  2. Tom October 8, 2011 at 8:22 am #

    Thank you! This is useful. (And now I have it in my Evernote notebook. 🙂

    • Justin Lancy October 12, 2011 at 12:31 pm #

      Very glad you enjoyed this!