nouamanetazi HF staff commited on
Commit
a04f639
1 Parent(s): 86f908d

add fullscreen button

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -8,6 +8,7 @@ import streamlit as st
8
  from streamlit_folium import st_folium
9
  from utils import legend_macro
10
  from huggingface_hub import HfApi
 
11
 
12
 
13
  TOKEN = os.environ.get("HF_TOKEN", None)
@@ -191,6 +192,13 @@ folium.TileLayer(
191
  # Add a LayerControl to the map to toggle between layers (Satellite View and Default One)
192
  folium.LayerControl().add_to(m)
193
 
 
 
 
 
 
 
 
194
 
195
  if show_interventions:
196
  for index, row in interventions_df.iterrows():
 
8
  from streamlit_folium import st_folium
9
  from utils import legend_macro
10
  from huggingface_hub import HfApi
11
+ from folium import plugins
12
 
13
 
14
  TOKEN = os.environ.get("HF_TOKEN", None)
 
192
  # Add a LayerControl to the map to toggle between layers (Satellite View and Default One)
193
  folium.LayerControl().add_to(m)
194
 
195
+ # Add Fullscreen button to the map
196
+ plugins.Fullscreen(
197
+ position='topright',
198
+ title='Expand me | تكبير الخريطة',
199
+ title_cancel='Exit me | تصغير الخريطة',
200
+ force_separate_button=True
201
+ ).add_to(m)
202
 
203
  if show_interventions:
204
  for index, row in interventions_df.iterrows():