2525import branca .element
2626
2727from folium .map import Popup , Marker , FitBounds , FeatureGroup
28- from folium .features import GeoJson , TopoJson , PolyLine , MultiPolyLine
28+ from folium .features import GeoJson , TopoJson , PolyLine , MultiPolyLine , RectangleMarker , Polygon
2929from folium .plugins import ImageOverlay
3030
3131rootpath = os .path .abspath (os .path .dirname (__file__ ))
@@ -246,7 +246,7 @@ def test_rectangle_marker(self):
246246
247247 # Single Rectangle marker.
248248 bounds = [45.60 , - 122.8 , 45.61 , - 122.7 ]
249- self .map .add_child (folium . RectangleMarker (bounds = bounds , popup = 'Hi' ))
249+ self .map .add_child (RectangleMarker (bounds = bounds , popup = 'Hi' ))
250250 marker = list (self .map ._children .values ())[- 1 ]
251251 rect_1 = rect_templ .render ({'RectangleMarker' : marker .get_name (),
252252 'location' : [45.60 , - 122.8 , 45.61 , - 122.7 ],
@@ -259,7 +259,7 @@ def test_rectangle_marker(self):
259259
260260 # Second Rectangle marker.
261261 bounds = [45.70 , - 122.9 , 45.75 , - 122.5 ]
262- self .map .add_child (folium . RectangleMarker (bounds = bounds , popup = 'Hi' ))
262+ self .map .add_child (RectangleMarker (bounds = bounds , popup = 'Hi' ))
263263 marker = list (self .map ._children .values ())[- 1 ]
264264 rect_2 = rect_templ .render ({'RectangleMarker' : marker .get_name (),
265265 'location' : [45.70 , - 122.9 , 45.75 , - 122.5 ],
@@ -288,7 +288,7 @@ def test_polygon(self):
288288 [35.6720 , 139.7606 ],
289289 [35.6682 , 139.7588 ],
290290 [35.6663 , 139.7627 ]]
291- self .map .add_child (folium . Polygon (locations = locations , popup = 'Hi' ))
291+ self .map .add_child (Polygon (locations = locations , popup = 'Hi' ))
292292 marker = list (self .map ._children .values ())[- 1 ]
293293 polygon_1 = polygon_templ .render ({'Polygon' : marker .get_name (),
294294 'location' : locations ,
@@ -308,9 +308,9 @@ def test_polygon(self):
308308 [35.5720 , 138.7606 ],
309309 [35.5682 , 138.7588 ],
310310 [35.5663 , 138.7627 ]]
311- self .map .add_child (folium . Polygon (locations = locations , color = 'red' ,
312- fill_color = 'red' , fill_opacity = 0.7 ,
313- weight = 3 , popup = 'Hi' ))
311+ self .map .add_child (Polygon (locations = locations , color = 'red' ,
312+ fill_color = 'red' , fill_opacity = 0.7 ,
313+ weight = 3 , popup = 'Hi' ))
314314 marker = list (self .map ._children .values ())[- 1 ]
315315 polygon_2 = polygon_templ .render ({'Polygon' : marker .get_name (),
316316 'location' : locations ,
0 commit comments