def returnSearch(): assert request.method=='POST' searchTerm=request.form['searchTerm'] ll=findCenterMinLargest(listOfOrigin)[0] businessJson=yelpSearch(ll,searchTerm) teles=timeSearch(ll) return render_template('home.html',dest=businessJson,teles3=teles,listOfOrigin=listOfOrigin,latC=ll[0],lngC=ll[1])
def hello(): if request.method=='POST': cLat=float(request.form['lat']) cLon=float(request.form['lon']) newl=[] newl.append(cLat) newl.append(cLon) boo=True for i in listOfOrigin: if(i[0]==cLat and i[1]==cLon): boo=False if(boo): listOfOrigin.append(newl) ll=findCenterMinLargest(listOfOrigin)[0] term="" businessJson=yelpSearch(ll,term) teles=timeSearch(ll) print(ll[0]) return render_template('home.html',dest=businessJson,teles3=teles,listOfOrigin=listOfOrigin,latC=ll[0],lngC=ll[1])