示例#1
0
def createMarkers(coupons, latlng):
	#First version uses one location per item.
	#Step one find the local_id in foursquare.
	#Live version was too unstable for live demos.
	con = db.connect_db()
	#Query database for info.
	with con:
		cur = con.cursor()
		markers= db.queryMarkers(cur)
	#Query foursquare for info to create markers
	return markers
示例#2
0
def offline():
	location = 'San Francisco, CA'
	con = db.connect_db()
	#Query database for info.
	with con:
		cur = con.cursor()
		latlng = gc.getGeocode(location,cur)
		markers = db.queryMarkers(cur)
	#Query foursquare for info to create markers
	(lat,lng) = latlng.split(",")
	return render_template("map.html",latitude = lat,longitude = lng, markers = markers)