File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 6363 var { { tile [ 'id' ] } } = L . tileLayer (
6464 '{{tile[' address ']}}' ,
6565 {
66- maxZoom : { { tile [ 'max_zoom ' ] } } ,
67- minZoom : { { tile [ 'min_zoom' ] } } ,
68- noWrap : { { tile [ 'no_wrap' ] . __str__ ( ) . lower ( ) } } ,
69- attribution : ' {{tile['attr ']}}' ,
70- detectRetina : { { tile [ 'detect_retina ' ] . __str__ ( ) . lower( ) } } ,
71- subdomains : ' {{tile['subdomains ']}}'
66+ "attribution" : " {{tile['attr ']}}" ,
67+ "detectRetina" : { { tile [ 'detect_retina' ] . __str__ ( ) . lower ( ) } } ,
68+ "maxZoom" : { { tile [ 'max_zoom' ] } } ,
69+ "minZoom" : { { tile [ 'min_zoom ' ] } } ,
70+ "noWrap" : { { tile [ 'no_wrap ' ] . __str__ ( ) . lower( ) } } ,
71+ " subdomains" : " {{tile['subdomains']}}"
7272 } ) . addTo ( { { map_id } } ) ;
7373 { % endfor % }
7474</ script >
Original file line number Diff line number Diff line change @@ -72,13 +72,15 @@ def setup(self):
7272 """Setup Folium Map."""
7373 with mock .patch ('branca.element.uuid4' ) as uuid4 :
7474 uuid4 ().hex = '0' * 32
75+ attr = 'http://openstreetmap.org'
7576 self .m = folium .Map (
7677 location = [45.5236 , - 122.6750 ],
7778 width = 900 ,
7879 height = 400 ,
7980 max_zoom = 20 ,
8081 zoom_start = 4 ,
81- max_bounds = True
82+ max_bounds = True ,
83+ attr = attr
8284 )
8385 self .env = Environment (loader = PackageLoader ('folium' , 'templates' ))
8486
@@ -309,9 +311,7 @@ def test_map_build(self):
309311 self .setup ()
310312 out = self .m ._parent .render ()
311313 html_templ = self .env .get_template ('fol_template.html' )
312- attr = ('Data by <a href="http://openstreetmap.org">OpenStreetMap'
313- '</a>,under '
314- '<a href="http://www.openstreetmap.org/copyright">ODbL</a>.' )
314+ attr = 'http://openstreetmap.org'
315315 tile_layers = [
316316 {'id' : 'tile_layer_' + '0' * 32 ,
317317 'address' : 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' ,
You can’t perform that action at this time.
0 commit comments