mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-05 16:32:54 +02:00
Update locationdata.py
This commit is contained in:
+1
-11
@@ -9,15 +9,5 @@ def where_am_i(lat=0, lon=0):
|
||||
|
||||
location = geolocator.reverse(lat+","+lon)
|
||||
address = location.raw['address']
|
||||
|
||||
# traverse the data
|
||||
city = address.get('city', '')
|
||||
state = address.get('state', '')
|
||||
country = address.get('country', '')
|
||||
zipcode = address.get('postcode')
|
||||
print('City : ', city)
|
||||
print('State : ', state)
|
||||
print('Country : ', country)
|
||||
print('Zip Code : ', zipcode)
|
||||
|
||||
return location
|
||||
return address
|
||||
Reference in New Issue
Block a user