GSMEthesis commited on
Commit
f748ca5
·
verified ·
1 Parent(s): c087cdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -16
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
- snap_green = "#00c569"
1007
 
1008
  # آیکون مبدا
1009
  folium.Marker(
@@ -1012,14 +1012,19 @@ def create_ride_map():
1012
  icon=folium.DivIcon(
1013
  html=f"""
1014
  <div style="
1015
- background-color: {snap_green};
1016
- color: white;
1017
- padding: 4px 8px;
1018
- border-radius: 8px;
 
 
 
 
 
1019
  font-weight: bold;
1020
  font-size: 13px;
1021
  font-family: sans-serif;
1022
- box-shadow: 0 2px 4px rgba(0,0,0,0.3);
1023
  ">
1024
  مبدا
1025
  </div>
@@ -1034,14 +1039,19 @@ def create_ride_map():
1034
  icon=folium.DivIcon(
1035
  html=f"""
1036
  <div style="
1037
- background-color: {snap_green};
1038
- color: white;
1039
- padding: 4px 8px;
1040
- border-radius: 8px;
 
 
 
 
 
1041
  font-weight: bold;
1042
  font-size: 13px;
1043
  font-family: sans-serif;
1044
- box-shadow: 0 2px 4px rgba(0,0,0,0.3);
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=snap_green,
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