|
22 | 22 | from folium.six import PY3 |
23 | 23 | from folium.plugins import ScrollZoomToggler, MarkerCluster |
24 | 24 | from folium.element import Html |
25 | | -from folium.map import Popup, Marker, Icon, FitBounds |
| 25 | +from folium.map import Popup, Marker, Icon, FitBounds, FeatureGroup |
26 | 26 | from folium.features import (DivIcon, CircleMarker, LatLngPopup, GeoJson, |
27 | 27 | GeoJsonStyle, ColorScale, TopoJson, PolyLine, |
28 | 28 | MultiPolyLine, ImageOverlay) |
@@ -157,6 +157,18 @@ def test_wms_layer(self): |
157 | 157 | assert (''.join(wms.split())[:-1] in |
158 | 158 | ''.join(map.get_root().render().split())) |
159 | 159 |
|
| 160 | + def test_feature_group(self): |
| 161 | + """Test FeatureGroup.""" |
| 162 | + |
| 163 | + map = folium.Map() |
| 164 | + feature_group = FeatureGroup() |
| 165 | + feature_group.add_children(Marker([45,-30],popup=Popup('-30'))) |
| 166 | + feature_group.add_children(Marker([45, 30],popup=Popup('30'))) |
| 167 | + map.add_children(feature_group) |
| 168 | + map.add_children(folium.map.LayerControl()) |
| 169 | + |
| 170 | + map._repr_html_() |
| 171 | + |
160 | 172 | def test_simple_marker(self): |
161 | 173 | """Test simple marker addition.""" |
162 | 174 |
|
|
0 commit comments