KeshavRa commited on
Commit
6e4de3c
·
verified ·
1 Parent(s): 09b12dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -17,6 +17,10 @@ def geocode_address(address, api_key):
17
  response = requests.get(geocode_url)
18
  data = response.json()
19
 
 
 
 
 
20
  # Reference: https://github.com/sfc38/Google-Maps-API-Streamlit-App/blob/master/google_maps_app.py#L126-L135
21
  def create_map():
22
  # Create the map with Google Maps
 
17
  response = requests.get(geocode_url)
18
  data = response.json()
19
 
20
+ lat = data['results'][0]['geometry']['location']['lat']
21
+ lon = data['results'][0]['geometry']['location']['lng']
22
+ return round(lat, 6), round(lon, 6)
23
+
24
  # Reference: https://github.com/sfc38/Google-Maps-API-Streamlit-App/blob/master/google_maps_app.py#L126-L135
25
  def create_map():
26
  # Create the map with Google Maps