ybendou commited on
Commit
9a413bb
·
1 Parent(s): 3d667fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -247,17 +247,11 @@ m = leafmap.Map(
247
  #Satellite View from Mapbox
248
  tileurl = 'https://api.mapbox.com/styles/v1/phd2020/clmer2mra01d001pbgjkictpt/tiles/256/{z}/{x}/{y}@2x?access_token=pk.eyJ1IjoicGhkMjAyMCIsImEiOiJja29lZzFwZmUwNHkzMm5wMjZnYjVvcGltIn0.tE0ritrelQOyLdKUH6hgOw'
249
 
250
- folium.TileLayer(
251
- tiles = tileurl,
252
- attr = 'Satellite View',
253
- name = 'Satellite View | عرض القمر الصناعي',
254
- overlay = False,
255
- control = True
256
- ).add_to(m)
257
-
258
- # Add a LayerControl to the map to toggle between layers (Satellite View and Default One)
259
- folium.LayerControl().add_to(m)
260
 
 
 
261
 
262
  if show_interventions:
263
  for index, row in interventions_df.iterrows():
 
247
  #Satellite View from Mapbox
248
  tileurl = 'https://api.mapbox.com/styles/v1/phd2020/clmer2mra01d001pbgjkictpt/tiles/256/{z}/{x}/{y}@2x?access_token=pk.eyJ1IjoicGhkMjAyMCIsImEiOiJja29lZzFwZmUwNHkzMm5wMjZnYjVvcGltIn0.tE0ritrelQOyLdKUH6hgOw'
249
 
250
+ # Add the Satellite View layer
251
+ m.add_tile_layer(tileurl, name="Satellite View | عرض القمر الصناعي", attribution="Satellite View")
 
 
 
 
 
 
 
 
252
 
253
+ # Add Layer Control (This is added by default in leafmap, but if you need to customize you can add it manually)
254
+ m.add_control(leafmap.LayerControl(position="topright"))
255
 
256
  if show_interventions:
257
  for index, row in interventions_df.iterrows():