@@ -96,11 +96,8 @@ def test_init(self):
96
96
assert self .m .get_name () == 'map_00000000000000000000000000000000'
97
97
assert self .m .get_root () == self .m ._parent
98
98
assert self .m .location == [45.5236 , - 122.6750 ]
99
- assert self .m .zoom_start == 4
100
- assert self .m .max_lat == 90
101
- assert self .m .min_lat == - 90
102
- assert self .m .max_lon == 180
103
- assert self .m .min_lon == - 180
99
+ assert self .m .options ['zoom' ] == 4
100
+ assert self .m .options ['maxBounds' ] == [[- 90 , - 180 ], [90 , 180 ]]
104
101
assert self .m .position == 'relative'
105
102
assert self .m .height == (400 , 'px' )
106
103
assert self .m .width == (900 , 'px' )
@@ -121,19 +118,6 @@ def test_init(self):
121
118
}
122
119
}
123
120
124
- def test_cloudmade (self ):
125
- """Test cloudmade tiles and the API key."""
126
- with pytest .raises (ValueError ):
127
- folium .Map (location = [45.5236 , - 122.6750 ], tiles = 'cloudmade' )
128
-
129
- m = folium .Map (location = [45.5236 , - 122.6750 ], tiles = 'cloudmade' ,
130
- API_key = '###' )
131
- cloudmade = 'http://{s}.tile.cloudmade.com/###/997/256/{z}/{x}/{y}.png'
132
- assert m ._children ['cloudmade' ].tiles == cloudmade
133
-
134
- bounds = m .get_bounds ()
135
- assert bounds == [[None , None ], [None , None ]], bounds
136
-
137
121
def test_builtin_tile (self ):
138
122
"""Test custom maptiles."""
139
123
@@ -201,47 +185,6 @@ def test_topo_json_smooth_factor(self):
201
185
topojson_str = topo_json ._template .module .script (topo_json )
202
186
assert '' .join (topojson_str .split ())[:- 1 ] in '' .join (out .split ())
203
187
204
- def test_map_build (self ):
205
- """Test map build."""
206
-
207
- # Standard map.
208
- self .setup ()
209
- rendered = self .m ._parent .render ()
210
-
211
- html_templ = self .env .get_template ('fol_template.html' )
212
- attr = 'http://openstreetmap.org'
213
- tile_layers = [
214
- {'id' : 'tile_layer_' + '0' * 32 ,
215
- 'address' : 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' ,
216
- 'attr' : attr ,
217
- 'max_native_zoom' : 20 ,
218
- 'max_zoom' : 20 ,
219
- 'min_zoom' : 0 ,
220
- 'detect_retina' : False ,
221
- 'no_wrap' : False ,
222
- 'tms' : False ,
223
- 'opacity' : 1 ,
224
- 'subdomains' : 'abc'
225
- }]
226
- tmpl = {'map_id' : 'map_' + '0' * 32 ,
227
- 'lat' : 45.5236 , 'lon' : - 122.675 ,
228
- 'width' : 'width: 900.0px;' ,
229
- 'height' : 'height: 400.0px;' ,
230
- 'zoom_level' : 4 ,
231
- 'max_bounds' : True ,
232
- 'min_lat' : - 90 ,
233
- 'max_lat' : 90 ,
234
- 'min_lon' : - 180 ,
235
- 'max_lon' : 180 ,
236
- 'tile_layers' : tile_layers ,
237
- 'crs' : 'EPSG3857' ,
238
- 'world_copy_jump' : False ,
239
- 'zoom_control' : True
240
- }
241
- expected = html_templ .render (tmpl , plugins = {})
242
-
243
- assert normalize (rendered ) == normalize (expected )
244
-
245
188
def test_choropleth_features (self ):
246
189
"""Test to make sure that Choropleth function doesn't allow
247
190
values outside of the domain defined by bins.
0 commit comments