Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Created September 24, 2017 16:02
Show Gist options
  • Save sergiolucero/1988220e6560e4176b681fe6dcba1833 to your computer and use it in GitHub Desktop.
Save sergiolucero/1988220e6560e4176b681fe6dcba1833 to your computer and use it in GitHub Desktop.
basic georeferencing
import googlemaps
GMAPS_API = 'AIzaSyBjB7GbQ2TL2SUW989uu7ZoP6S0bxsv3t8' # EKHOS July 2017
gmaps = googlemaps.Client(key=GMAPS_API)
gref = gmaps.geocode('Emilio Vaisse 564, Providencia')
print(gref[0]['geometry'])
@sergiolucero
Copy link
Author

r=gmaps.reverse_geocode(s[0])
print(r[0]['formatted_address'])

@sergiolucero
Copy link
Author

for mode in ['driving','transit','walking']:
gmaps.directions("El Golf, Las Condes",
"Teatinos, Santiago",
mode=mode,
departure_time=now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment