Merge remote-tracking branch 'origin/landing' into landing
Conflicts: views/index.html
This commit is contained in:
commit
a08f93ff5b
9
app.py
9
app.py
|
@ -30,6 +30,15 @@ def showMap(threewords):
|
||||||
return template('index',
|
return template('index',
|
||||||
err="Could not find location {}".format(threewords))
|
err="Could not find location {}".format(threewords))
|
||||||
|
|
||||||
|
@get('/latlng/<lat:float>,<lng:float>')
|
||||||
|
def showMapFromLatLng(lat, lng):
|
||||||
|
try:
|
||||||
|
threewords = these.three_words((lat, lng))
|
||||||
|
return template('map', lat=lat, lng=lng, threewords=threewords)
|
||||||
|
except:
|
||||||
|
return template('index',
|
||||||
|
err="Could not find location {}".format(threewords))
|
||||||
|
|
||||||
|
|
||||||
@get('/latlng/<lat:float>,<lng:float>')
|
@get('/latlng/<lat:float>,<lng:float>')
|
||||||
def showMapFromLatLng(lat, lng):
|
def showMapFromLatLng(lat, lng):
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places"></script>
|
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places"></script>
|
||||||
<script src="/static/js/app.js"></script>
|
<script src="/static/js/app.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body onload="initialize()">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
% if err:
|
% if err:
|
||||||
<aside class="alert alert-danger" role="alert">Error: {{ err }}</aside>
|
<aside class="alert alert-danger" role="alert">Error: {{ err }}</aside>
|
||||||
|
|
Loading…
Reference in New Issue