GSMEthesis commited on
Commit
517d7ae
·
verified ·
1 Parent(s): a9931dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -61
app.py CHANGED
@@ -998,90 +998,48 @@ def enhanced_likert_scale(question_data):
998
  def create_ride_map():
999
  origin = [35.7665280, 51.3300394] # پونک شمالی
1000
  destination = [35.7552343, 51.4204264] # پل طبیعت
1001
-
1002
- m = folium.Map(location=[(origin[0] + destination[0]) / 2, (origin[1] + destination[1]) / 2], zoom_start=13)
1003
-
1004
  purple = "#6a0dad"
1005
 
1006
- # مبدأ: آیکون دایره (با icon='circle')
1007
- folium.Marker(
1008
- location=origin,
1009
- tooltip="مبدا",
1010
- icon=folium.Icon(color="#6a0dad", icon="circle", prefix="fa")
1011
- ).add_to(m)
1012
 
1013
- # مبدأ - دایره + لیبل
1014
  folium.Marker(
1015
  location=origin,
1016
- tooltip="مبدا",
1017
  icon=folium.DivIcon(
1018
  html=f"""
1019
- <div style="display: flex; align-items: center; direction: rtl;">
1020
- <div style="
1021
- width: 12px;
1022
- height: 12px;
1023
- background-color: {purple};
1024
- border-radius: 50%;
1025
- margin-left: 6px;
1026
- "></div>
1027
- <div style="
1028
- background-color: white;
1029
- border: 2px solid {purple};
1030
- border-radius: 6px;
1031
- padding: 2px 8px;
1032
- color: {purple};
1033
- font-weight: bold;
1034
- font-size: 13px;
1035
- font-family: sans-serif;
1036
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
1037
- ">
1038
- مبدا
1039
- </div>
1040
- </div>
1041
  """
1042
  )
1043
  ).add_to(m)
1044
 
1045
- # مقصد: آیکون پرچم
1046
- folium.Marker(
1047
- location=destination,
1048
- tooltip="مقصد",
1049
- icon=folium.Icon(color="#6a0dad", icon="flag", prefix="fa")
1050
- ).add_to(m)
1051
-
1052
- # مقصد - آیکون پرچم + لیبل
1053
  folium.Marker(
1054
  location=destination,
1055
  tooltip="مقصد",
1056
  icon=folium.DivIcon(
1057
  html=f"""
1058
- <div style="display: flex; align-items: center; direction: rtl;">
1059
  <div style="
1060
- width: 12px;
1061
- height: 12px;
1062
- background-color: {purple};
1063
- border-radius: 50%;
1064
- margin-left: 6px;
1065
  "></div>
1066
- <div style="
1067
- background-color: white;
1068
- border: 2px solid {purple};
1069
- border-radius: 6px;
1070
- padding: 2px 8px;
1071
- color: {purple};
1072
- font-weight: bold;
1073
- font-size: 13px;
1074
- font-family: sans-serif;
1075
- box-shadow: 0 1px 3px rgba(0,0,0,0.3);
1076
- ">
1077
- مقصد
1078
- </div>
1079
  </div>
1080
  """
1081
  )
1082
  ).add_to(m)
1083
 
1084
- # خط بین مسیر
1085
  folium.PolyLine(
1086
  [origin, destination],
1087
  color=purple,
@@ -1092,6 +1050,7 @@ def create_ride_map():
1092
 
1093
  return m
1094
 
 
1095
  def show_explanation(exp_type):
1096
  """نمایش توضیحات قیمت"""
1097
  explanations = {
 
998
  def create_ride_map():
999
  origin = [35.7665280, 51.3300394] # پونک شمالی
1000
  destination = [35.7552343, 51.4204264] # پل طبیعت
 
 
 
1001
  purple = "#6a0dad"
1002
 
1003
+ m = folium.Map(location=[(origin[0] + destination[0]) / 2, (origin[1] + destination[1]) / 2], zoom_start=13)
 
 
 
 
 
1004
 
1005
+ # مبدأ - دایره بنفش
1006
  folium.Marker(
1007
  location=origin,
1008
+ tooltip="مبدأ",
1009
  icon=folium.DivIcon(
1010
  html=f"""
1011
+ <div style="
1012
+ width: 16px;
1013
+ height: 16px;
1014
+ background-color: {purple};
1015
+ border-radius: 50%;
1016
+ border: 2px solid white;
1017
+ box-shadow: 0 0 3px rgba(0,0,0,0.4);
1018
+ "></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1019
  """
1020
  )
1021
  ).add_to(m)
1022
 
1023
+ # مقصد - پرچم با رنگ بنفش
 
 
 
 
 
 
 
1024
  folium.Marker(
1025
  location=destination,
1026
  tooltip="مقصد",
1027
  icon=folium.DivIcon(
1028
  html=f"""
1029
+ <div style="position: relative; width: 16px; height: 16px;">
1030
  <div style="
1031
+ width: 0;
1032
+ height: 0;
1033
+ border-top: 8px solid transparent;
1034
+ border-bottom: 8px solid transparent;
1035
+ border-left: 12px solid {purple};
1036
  "></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
1037
  </div>
1038
  """
1039
  )
1040
  ).add_to(m)
1041
 
1042
+ # خط مسیر بنفش
1043
  folium.PolyLine(
1044
  [origin, destination],
1045
  color=purple,
 
1050
 
1051
  return m
1052
 
1053
+
1054
  def show_explanation(exp_type):
1055
  """نمایش توضیحات قیمت"""
1056
  explanations = {