• ** There has been a recent site upgrade. Please clear your browser cache to avoid issues. **
  • New forum feature - post voting and best solution

    Check out this thread for the details: https://www.access-programmers.co.uk/forums/threads/new-forum-feature-post-voting-and-best-answer.314134/

    This new feature looks great to me! :)

  • We now have 3 forum themes

    Go for the default (light) theme, Shades of Grey or Shades of Blue. I just added the Blue one.

    The thread about it is here: https://www.access-programmers.co.uk/forums/threads/new-forum-theme-shades-of-blue.314136/

Get Geolocation Data from Photos (1 Viewer)

Not open for further replies.


Local time
Today, 14:15
Jan 14, 2017
If you’re anything like me, you will have built up a large collection of digital photos from your phone or camera but may have forgotten where many of those photos were taken

This app is designed to manage that situation and was prompted by a request from AWF member MickJav in this thread https://www.access-programmers.co.uk/forums/showthread.php?t=307462. It was adapted from my existing example app Get Current Geolocation

It works by extracting the geolocation info which may be saved as part of the EXIF data stored with the photo. The code to do this was written by Wayne Phillips of EverythingAccess.com.. See https://www.everythingaccess.com/tutorials.asp?ID=Extracting-GPS-data-from-JPEG-files

The data extracted includes latitude, longitude & altitude together with the date/time taken.
A static Google map is then loaded centred on the saved location data.
The closest address to the saved co-ordinates is also displayed

1. This only works for JPG files (standard filetype for digital photos).
2. In addition, Location Services must be enabled on your phone (if you have this as an option)
3. Many older cameras/phones may not include this information. A message is displayed to indicate when no geolocation data is available

Other features:
a) The photo may be rotated clockwise in intervals of 90 degrees if it isn’t properly displayed. Unfortunately image rotation is a common issue in Access. The code used to rotate the images was courtesy of Daniel Pineault: https://www.devhut.net/2017/05/14/vba-wia-rotate-an-image/
b) You can choose from the following map types: roadmap, terrain, satellite, hybrid
The map may be zoomed in/out or nudged up/down/left/right.
NOTE: Each change requires a new map to be downloaded but this is almost instantaneous
c) A full screen ‘dynamic’ map can also be used as an alternative

Using this app requires an Internet connection and a ‘free’ Google Maps API key

When the app is first opened, you will see the following screen:

Follow the instructions on the form to obtain a free Google Maps API key then enter it on the form.
You will need to provide bank card details when you obtain your API key

Downloading maps is free for small/medium use (currently 100,000 free requests per month) though charges can be significant for large scale use (currently $2 per extra 1000 requests per month).

I hope forum members will find this application useful
I have supplied 6 sample photos including one of my dog Isla (5 photos have geolocation data & 1 does not) for members to try out the app.
Please send me a PM or email me with any comments or suggestions for additional features.
Also let me know if there are any issues

EDIT: Updated to version 1.1 to fix error when entering an API key.


  • PhotoLocation.jpg
    106.2 KB · Views: 448
  • APIKey.PNG
    41.8 KB · Views: 455
  • GetPhotoLocation v1.1.zip
    1.8 MB · Views: 130
Last edited:


Local time
Today, 14:15
Jan 14, 2017
Minor update to version 1.2. Changes include:
a) camera direction info added to form (AKA the Kevlray amendment)
b) report added

The first of these was done following this slightly facetious comment in another thread:
Now if I could get some real 'intelligence' from a picture. So I take a picture of a mountain 20 miles away, but I do not remember what direction I was facing, so how do I figure out what mountain I took a picture of :)
See https://www.access-programmers.co.uk/forums/showpost.php?p=1646159&postcount=21
Well now he can :rolleyes::D

Sample photos now moved to separate zip file


  • PhotoLocationForm_v1.2.jpg
    101.6 KB · Views: 42
  • GetPhotoLocation v1.2.zip
    1.8 MB · Views: 109
  • SamplePhotos.zip
    879.8 KB · Views: 89
Last edited:
Not open for further replies.

Users who are viewing this thread

Top Bottom