nouamanetazi HF staff badr12a commited on
Commit
886bf76
1 Parent(s): bd8b954

Satellite View (#7)

Browse files

- Satellite View (29c20ac77ecd926b1d30fb8e9aa655ad7d883528)


Co-authored-by: badr <badr12a@users.noreply.huggingface.co>

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