badr12a commited on
Commit
29c20ac
1 Parent(s): e8f588a

Satellite View

Browse files

Salam alaykoum, here is a PR to add the "Satellite View" feature to the map, to provide more detailed information on areas requiring support.

Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -157,6 +157,21 @@ m = folium.Map(
157
  max_bounds=True,
158
  )
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  if show_interventions:
161
  for index, row in interventions_df.iterrows():
162
  status = "Done ✅" if row[interventions_df.columns[5]]=="Intervention prévue dans le futur / Planned future intervention" else "Planned ⌛"
 
157
  max_bounds=True,
158
  )
159
 
160
+ #Satellite View from Mapbox
161
+ tileurl = 'https://api.mapbox.com/styles/v1/phd2020/clmer2mra01d001pbgjkictpt/tiles/256/{z}/{x}/{y}@2x?access_token=pk.eyJ1IjoicGhkMjAyMCIsImEiOiJja29lZzFwZmUwNHkzMm5wMjZnYjVvcGltIn0.tE0ritrelQOyLdKUH6hgOw'
162
+
163
+ folium.TileLayer(
164
+ tiles = tileurl,
165
+ attr = 'Satellite View',
166
+ name = 'Satellite View | عرض القمر الصناعي',
167
+ overlay = False,
168
+ control = True
169
+ ).add_to(m)
170
+
171
+ # Add a LayerControl to the map to toggle between layers (Satellite View and Default One)
172
+ folium.LayerControl().add_to(m)
173
+
174
+
175
  if show_interventions:
176
  for index, row in interventions_df.iterrows():
177
  status = "Done ✅" if row[interventions_df.columns[5]]=="Intervention prévue dans le futur / Planned future intervention" else "Planned ⌛"