Skip to content

Instantly share code, notes, and snippets.

@omiq
Created June 18, 2018 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omiq/a06e68262d1a45123e0b9d0aad6e9c03 to your computer and use it in GitHub Desktop.
Save omiq/a06e68262d1a45123e0b9d0aad6e9c03 to your computer and use it in GitHub Desktop.
Get a Google map from photos using photo picker on iOS
import photos
import webbrowser
picked = photos.pick_asset()
print(dir(picked))
geo_loc = picked.location
lat = geo_loc['latitude']
long = geo_loc['longitude']
map_url = "comgooglemaps://www.google.com/maps/?q={},{}".format(lat,long)
print(map_url)
webbrowser.open(map_url, new=1, autoraise=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment