diff --git a/README.md b/README.md
index f3f8d0c..2f0de9c 100644
--- a/README.md
+++ b/README.md
@@ -1 +1 @@
-# srmmap
\ No newline at end of file
+# srmmap app
\ No newline at end of file
diff --git a/desktop.ini b/desktop.ini
new file mode 100644
index 0000000..978cc91
--- /dev/null
+++ b/desktop.ini
@@ -0,0 +1,6 @@
+[.ShellClassInfo]
+IconResource=C:\WINDOWS\System32\SHELL32.dll,159
+[ViewState]
+Mode=
+Vid=
+FolderType=Generic
diff --git a/instance/database.db b/instance/database.db
index 5a3bab0..5b885d0 100644
Binary files a/instance/database.db and b/instance/database.db differ
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..18d1c03
--- /dev/null
+++ b/main.py
@@ -0,0 +1,5 @@
+try:
+ conn = pymongo.MongoClient('mongodb+srv://aditya:12345@cluster0.rutst.mongodb.net/test')
+ print("Connected successfully!!!")
+except:
+ print("Could not connect to MongoDB")
\ No newline at end of file
diff --git a/website/__pycache__/__init__.cpython-38.pyc b/website/__pycache__/__init__.cpython-38.pyc
index 9b704b5..7d81d3f 100644
Binary files a/website/__pycache__/__init__.cpython-38.pyc and b/website/__pycache__/__init__.cpython-38.pyc differ
diff --git a/website/__pycache__/auth.cpython-38.pyc b/website/__pycache__/auth.cpython-38.pyc
index b50a1ff..74abfd0 100644
Binary files a/website/__pycache__/auth.cpython-38.pyc and b/website/__pycache__/auth.cpython-38.pyc differ
diff --git a/website/__pycache__/dist.cpython-38.pyc b/website/__pycache__/dist.cpython-38.pyc
index 7b1184d..2333282 100644
Binary files a/website/__pycache__/dist.cpython-38.pyc and b/website/__pycache__/dist.cpython-38.pyc differ
diff --git a/website/__pycache__/models.cpython-38.pyc b/website/__pycache__/models.cpython-38.pyc
index 0c51acd..5c8da0f 100644
Binary files a/website/__pycache__/models.cpython-38.pyc and b/website/__pycache__/models.cpython-38.pyc differ
diff --git a/website/__pycache__/views.cpython-38.pyc b/website/__pycache__/views.cpython-38.pyc
index 3ad970f..1994da5 100644
Binary files a/website/__pycache__/views.cpython-38.pyc and b/website/__pycache__/views.cpython-38.pyc differ
diff --git a/website/dist.py b/website/dist.py
index 48aa567..1242c28 100644
--- a/website/dist.py
+++ b/website/dist.py
@@ -8,12 +8,14 @@
import base64
from folium import IFrame
ox.config(log_console=True, use_cache=True)
+
try:
conn = pymongo.MongoClient('mongodb+srv://aditya:12345@cluster0.rutst.mongodb.net/test')
print("Connected successfully!!!")
except:
print("Could not connect to MongoDB")
+
db = conn.SRMAP
collection=db['LANDMARKS']
@@ -59,9 +61,9 @@ def distance():
weight=optimizer)
le=nx.shortest_path_length(graph,orig_node,dest_node, method='dijkstra',weight=optimizer)
if optimizer=='time':
- Info='It will take you '+str(le)+' minutes'
+ Info='It will take you '+str(int(le))+' minutes'
elif optimizer=='length':
- Info='The distance between your source and target '+str(le)+' meters'
+ Info='The distance between your source and target '+str(int(le))+' meters'
else:
Info='Please select your source and target'
@@ -82,7 +84,7 @@ def distance():
popup = folium.Popup(iframe, max_width=400)
start_latlng = (start_latlng[0], start_latlng[1])
start_marker = folium.Marker(location=start_latlng, icon=folium.Icon(color='green'), popup=popup,
- tooltip=html)
+ tooltip=source)
elif source == 'SRM University Building':
encoded = base64.b64encode(open('website/ub.jpg', 'rb').read())
html = ''.format
@@ -90,7 +92,7 @@ def distance():
popup = folium.Popup(iframe, max_width=400)
start_latlng = (start_latlng[0], start_latlng[1])
start_marker = folium.Marker(location=start_latlng, icon=folium.Icon(color='green'), popup=popup,
- tooltip=html)
+ tooltip=source)
else:
start_latlng = (start_latlng[0], start_latlng[1])
start_marker = folium.Marker(location=start_latlng, icon=folium.Icon(color='green'), popup=source,
@@ -101,7 +103,7 @@ def distance():
iframe_t = IFrame(html_t(encoded_t.decode('UTF-8')), width=400, height=350)
popup_t = folium.Popup(iframe_t, max_width=400)
end_latlng = (end_latlng[0], end_latlng[1])
- end_marker = folium.Marker(location=end_latlng, icon=folium.Icon(color='red'), popup=popup_t,tooltip=html_t)
+ end_marker = folium.Marker(location=end_latlng, icon=folium.Icon(color='red'), popup=popup_t,tooltip=target)
elif target == 'BIO-Tech Block':
encoded_t = base64.b64encode(open('website/BioTech.jpg', 'rb').read())
html_t = '
'.format
@@ -109,7 +111,7 @@ def distance():
popup_t = folium.Popup(iframe_t, max_width=400)
end_latlng = (end_latlng[0], end_latlng[1])
end_marker = folium.Marker(location=end_latlng, icon=folium.Icon(color='red'), popup=popup_t,
- tooltip=html_t)
+ tooltip=target)
elif target == 'SRM University Building':
encoded_t = base64.b64encode(open('website/ub.jpg', 'rb').read())
html_t = '
'.format
@@ -117,7 +119,7 @@ def distance():
popup_t = folium.Popup(iframe_t, max_width=400)
end_latlng = (end_latlng[0], end_latlng[1])
end_marker = folium.Marker(location=end_latlng, icon=folium.Icon(color='red'), popup=popup_t,
- tooltip=html_t)
+ tooltip=target)
else:
end_latlng = (end_latlng[0], end_latlng[1])
end_marker = folium.Marker(location=end_latlng, icon=folium.Icon(color='red'), popup=target,
diff --git a/website/static/Destination_map.html b/website/static/Destination_map.html
index 8ae8c5f..a8adb28 100644
--- a/website/static/Destination_map.html
+++ b/website/static/Destination_map.html
@@ -25,7 +25,7 @@
-
-
Determine the path between two SRM buildings.
+{{Info}}
+ + +
+