Created
June 18, 2018 23:11
-
-
Save omiq/a06e68262d1a45123e0b9d0aad6e9c03 to your computer and use it in GitHub Desktop.
Get a Google map from photos using photo picker on iOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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