Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. !pip install googlemaps
  2.  
  3. import googlemaps
  4.  
  5. gmaps = googlemaps.Client(key='client-key')
  6.  
  7. geocode_result = gmaps.geocode('1600 Amphitheatre Parkway, Mountain View, CA')
  8.  
  9. lat = geocode_result[0]['geometry']['location']['lat']
  10.  
  11. lng = geocode_result[0]['geometry']['location']['lng']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement