Show Map Location of Selected Image File

Here’s an interesting Automator service for quickly accessing a map showing the origination location of an image file selected in the Finder. The interactive map will be displayed in a floating HUD window in the Finder.

TIP: Don’t want to read the following tutorial? Watch this movie instead!

The Service Workflow

This service workflow is composed of a series of Automator actions, each of which is described in detail below. You can construct the workflow if you wish, or use the completed copy provided later on this webpage.

 1  Data Input Bar  (⬇ see below )  • The first step in creating any Automator service is to set the parameters of the data input bar at the top of the workflow document window. Set the input data type by selecting “image files” from the input types popup menu  1 , and then select the Finder application from the target application  2  popup menu.

 2  Run AppleScript Action • The default Automator library does not contain an action for extracting the latitude and longitude attributes from the embedded metadata of an image file. So, for the purposes of this workflow, we’ll use an AppleScript script to derive the location coordinates of the selected image and use those coordinates to construct a map search URL that is passed to the following action in the workflow.

The script contains two script handlers: the run handler  3  accepts and processes the data passed from the service as input to the action; and a specialized sub-routine  4  for extracting the location data from an image file and using it to create a map search URL.

<-- Access the script by clicking this button

Workflow for deriving and displaying the location of an image file

 3  Website Popup Action  (⬆ see above )  The default Automator library contains an action for displaying a URL in a floating HUD palette. You can indicate a custom size for the window by choosing Custom from the Site Size popup menu  6  and then entering the width and height for the window in the size input fields  7  . The window can be automatically centered in the screen during display by selecting Centered from the Postion popup menu located just below the size input fields.

For the purposes of this workflow, set the value of the User Agent popup menu  8  to be Safari, and set the value of the action Output popup menu  8  to be the Current URL displayed in the floating window. If the service user clicks the OK button (instead of the Cancel button) located at the bottom right the window, the URL of the webpage currently displayed in the window will be passed to the next action.

 4  Display Webpages action  (⬆ see above )  This action will open the URL(s) passed to it, in new Safari browser windows or tabs.

Install the Service

For your convenience, we’ve provided a completed copy of the service workflow for you to download and install.

DO THIS ►DOWNLOAD the ZIP archive containing the service workflow file. Right-click the selected workflow file and choose Open from the contextual menu  (⬇ see below ) 

Selecting the Open command from the contextual menu for the service workflow.

DO THIS ►In the forthcoming security prompt dialog, click the Install button  (⬇ see below ) 


The service workflow file will be moved to the Services folder in your home Library folder and be activated for use. A confirmation dialog will appear  (⬇ see below ) 


You are now ready to try the service.

Using the Service

DO THIS ►DOWNLOAD example image files.

To use the installed service, right-click an image file in the Finder, that contains location metadata and choose the service from the Finder contextual menu  (⬇ see below ) 


(⬇ see below ) A Google location map for the selected image.


(⬇ see below ) A Google location map for the selected image.