loubnabnl HF staff commited on
Commit
acd3ac2
1 Parent(s): eac7583

fix fullscreen (geocoder still not working though)

Browse files
Files changed (1) hide show
  1. src/utils.py +6 -4
src/utils.py CHANGED
@@ -115,19 +115,21 @@ def init_map():
115
  max_bounds=True,
116
  )
117
  # Add a search bar to the map
118
- plugins.Geocoder(
119
  collapsed=False,
120
  position="topright",
121
  placeholder="Search | البحث",
122
- ).add_to(m)
 
123
 
124
  # Add Fullscreen button to the map
125
- plugins.Fullscreen(
126
  position="topright",
127
  title="Expand me | تكبير الخريطة",
128
  title_cancel="Exit me | تصغير الخريطة",
129
  force_separate_button=True,
130
- ).add_to(m)
 
131
 
132
  # Satellite View from Mapbox
133
  tileurl = "https://marocmap.ikiker.com/maroc/{z}/{x}/{y}.png"
 
115
  max_bounds=True,
116
  )
117
  # Add a search bar to the map
118
+ geocoder = plugins.Geocoder(
119
  collapsed=False,
120
  position="topright",
121
  placeholder="Search | البحث",
122
+ )
123
+ m.add_child(geocoder)
124
 
125
  # Add Fullscreen button to the map
126
+ fullscreen = plugins.Fullscreen(
127
  position="topright",
128
  title="Expand me | تكبير الخريطة",
129
  title_cancel="Exit me | تصغير الخريطة",
130
  force_separate_button=True,
131
+ )
132
+ m.add_child(fullscreen)
133
 
134
  # Satellite View from Mapbox
135
  tileurl = "https://marocmap.ikiker.com/maroc/{z}/{x}/{y}.png"