Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|