-
Notifications
You must be signed in to change notification settings - Fork 0
/
protogui.py
45 lines (40 loc) · 1.23 KB
/
protogui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# What should we do with our user interface??
from flask import Flask, render_template
from flask_googlemaps import GoogleMaps
from flask_googlemaps import Map
app = Flask(__name__, template_folder="templates")
app.config['GOOGLEMAPS_KEY'] = "AIzaSyBYhkmFKfz745tUYWf5CskwslxKan6M_-E"
GoogleMaps(app)
# TODO: GET THE MARKERS: THEIR
merkers = []
@app.route("/")
def mapview():
# creating a map in the view
mymap = Map(
identifier="view-side",
lat=43.782421,
lng=-79.186651,
markers=[(43.782421, -79.186651)]
)
sndmap = Map(
identifier="sndmap",
lat=43.782421,
lng=-79.186651,
markers=[
{
'icon': 'http://maps.google.com/mapfiles/ms/icons/green-dot.png',
'lat': 37.4419,
'lng': -122.1419,
'infobox': "<b>Scarborough Town Center</b>"
},
{
'icon': 'http://maps.google.com/mapfiles/ms/icons/blue-dot.png',
'lat': 43.782421,
'lng': -79.186651,
'infobox': "<b>UTSC</b>"
}
]
)
return render_template('template.html', mymap=mymap, sndmap=sndmap)
if __name__ == "__main__":
app.run(debug=True)