Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -996,14 +996,14 @@ def enhanced_likert_scale(question_data):
|
|
| 996 |
|
| 997 |
|
| 998 |
def create_ride_map():
|
| 999 |
-
"""ایجاد نقشه سفر با
|
| 1000 |
origin = [35.7665280, 51.3300394] # پونک شمالی
|
| 1001 |
destination = [35.7552343, 51.4204264] # پل طبیعت
|
| 1002 |
|
| 1003 |
m = folium.Map(location=[(origin[0] + destination[0]) / 2, (origin[1] + destination[1]) / 2], zoom_start=13)
|
| 1004 |
|
| 1005 |
-
# رنگ
|
| 1006 |
-
|
| 1007 |
|
| 1008 |
# آیکون مبدا
|
| 1009 |
folium.Marker(
|
|
@@ -1012,14 +1012,19 @@ def create_ride_map():
|
|
| 1012 |
icon=folium.DivIcon(
|
| 1013 |
html=f"""
|
| 1014 |
<div style="
|
| 1015 |
-
|
| 1016 |
-
|
| 1017 |
-
|
| 1018 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1019 |
font-weight: bold;
|
| 1020 |
font-size: 13px;
|
| 1021 |
font-family: sans-serif;
|
| 1022 |
-
box-shadow: 0
|
| 1023 |
">
|
| 1024 |
مبدا
|
| 1025 |
</div>
|
|
@@ -1034,14 +1039,19 @@ def create_ride_map():
|
|
| 1034 |
icon=folium.DivIcon(
|
| 1035 |
html=f"""
|
| 1036 |
<div style="
|
| 1037 |
-
|
| 1038 |
-
|
| 1039 |
-
|
| 1040 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1041 |
font-weight: bold;
|
| 1042 |
font-size: 13px;
|
| 1043 |
font-family: sans-serif;
|
| 1044 |
-
box-shadow: 0
|
| 1045 |
">
|
| 1046 |
مقصد
|
| 1047 |
</div>
|
|
@@ -1049,12 +1059,13 @@ def create_ride_map():
|
|
| 1049 |
)
|
| 1050 |
).add_to(m)
|
| 1051 |
|
| 1052 |
-
# خط مسیر
|
| 1053 |
folium.PolyLine(
|
| 1054 |
[origin, destination],
|
| 1055 |
-
color=
|
| 1056 |
weight=4,
|
| 1057 |
-
opacity=0.8
|
|
|
|
| 1058 |
).add_to(m)
|
| 1059 |
|
| 1060 |
return m
|
|
|
|
| 996 |
|
| 997 |
|
| 998 |
def create_ride_map():
|
| 999 |
+
"""ایجاد نقشه سفر با ایکونهای شبیه اسنپ اما با رنگ بنفش"""
|
| 1000 |
origin = [35.7665280, 51.3300394] # پونک شمالی
|
| 1001 |
destination = [35.7552343, 51.4204264] # پل طبیعت
|
| 1002 |
|
| 1003 |
m = folium.Map(location=[(origin[0] + destination[0]) / 2, (origin[1] + destination[1]) / 2], zoom_start=13)
|
| 1004 |
|
| 1005 |
+
# رنگ بنفش
|
| 1006 |
+
purple = "#6a0dad"
|
| 1007 |
|
| 1008 |
# آیکون مبدا
|
| 1009 |
folium.Marker(
|
|
|
|
| 1012 |
icon=folium.DivIcon(
|
| 1013 |
html=f"""
|
| 1014 |
<div style="
|
| 1015 |
+
display: flex;
|
| 1016 |
+
justify-content: center;
|
| 1017 |
+
align-items: center;
|
| 1018 |
+
width: 50px;
|
| 1019 |
+
height: 30px;
|
| 1020 |
+
background-color: white;
|
| 1021 |
+
border: 2px solid {purple};
|
| 1022 |
+
border-radius: 6px;
|
| 1023 |
+
color: {purple};
|
| 1024 |
font-weight: bold;
|
| 1025 |
font-size: 13px;
|
| 1026 |
font-family: sans-serif;
|
| 1027 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
| 1028 |
">
|
| 1029 |
مبدا
|
| 1030 |
</div>
|
|
|
|
| 1039 |
icon=folium.DivIcon(
|
| 1040 |
html=f"""
|
| 1041 |
<div style="
|
| 1042 |
+
display: flex;
|
| 1043 |
+
justify-content: center;
|
| 1044 |
+
align-items: center;
|
| 1045 |
+
width: 50px;
|
| 1046 |
+
height: 30px;
|
| 1047 |
+
background-color: white;
|
| 1048 |
+
border: 2px solid {purple};
|
| 1049 |
+
border-radius: 6px;
|
| 1050 |
+
color: {purple};
|
| 1051 |
font-weight: bold;
|
| 1052 |
font-size: 13px;
|
| 1053 |
font-family: sans-serif;
|
| 1054 |
+
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
| 1055 |
">
|
| 1056 |
مقصد
|
| 1057 |
</div>
|
|
|
|
| 1059 |
)
|
| 1060 |
).add_to(m)
|
| 1061 |
|
| 1062 |
+
# خط مسیر بنفش
|
| 1063 |
folium.PolyLine(
|
| 1064 |
[origin, destination],
|
| 1065 |
+
color=purple,
|
| 1066 |
weight=4,
|
| 1067 |
+
opacity=0.8,
|
| 1068 |
+
dash_array="5, 5"
|
| 1069 |
).add_to(m)
|
| 1070 |
|
| 1071 |
return m
|