Skip to content

Commit

Permalink
Adding OpenStreetMap url to example output
Browse files Browse the repository at this point in the history
Ctrl-click in terminal to open a browser to show you the map
  • Loading branch information
rduivenvoorde committed Dec 6, 2017
1 parent 3e2498b commit 67b55ca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion exemples/get-leaf-location.py
Expand Up @@ -37,5 +37,12 @@
print "Waiting for response (sleep 10)"
time.sleep(10)
else:
print("lat: {} long: {}".format(location_status.latitude, location_status.longitude))
lat = location_status.latitude
lon = location_status.longitude
print("lat: {} long: {}".format(lat, lon))
# OpenStreetMap url, ctrl click in terminal to open browser,
# for example, my parking lot ;)
# http://www.openstreetmap.org/search?query=52.37309+4.89217#map=19/52.37310/4.89220
z = 19 # zoom level, lower is bigger area
print("http://www.openstreetmap.org/search?query={}%20{}#map={}/{}/{}".format(lat,lon,z,lat,lon))
break

0 comments on commit 67b55ca

Please sign in to comment.