@@ -59,60 +59,6 @@ def test_layer(self):
5959 mapa .add_children (folium .map .LayerControl ())
6060 mapa ._repr_html_ ()
6161
62- def test_geo_json (self ):
63- N = 100
64- lons = 5 - np .random .normal (size = N )
65- lats = 48 - np .random .normal (size = N )
66- coordinates = [[lon , lat ] for (lat , lon ) in zip (lats , lons )]
67- data = {
68- "type" : "FeatureCollection" ,
69- "features" : [
70- {
71- "type" : "Feature" ,
72- "geometry" : {
73- "type" : "MultiPoint" ,
74- "coordinates" : coordinates ,
75- },
76- "properties" : {"prop0" : "value0" }
77- },
78- ],
79- }
80-
81- mapa = folium .Map ([48. , 5. ], zoom_start = 6 )
82- mapa .add_plugin (plugins .GeoJson (data ))
83- mapa ._build_map ()
84-
85- open ('geojson_plugin_test1.json' , 'w' ).write (json .dumps (data ))
86- mapb = folium .Map ([48. , 5. ], zoom_start = 6 )
87- mapb .add_plugin (plugins .GeoJson (open ('geojson_plugin_test1.json' )))
88- mapb ._build_map ()
89-
90- coordinates = [[[[lon + 1e-4 , lat + 1e-4 ], [lon + 1e-4 , lat - 1e-4 ],
91- [lon - 1e-4 , lat - 1e-4 ], [lon - 1e-4 , lat + 1e-4 ]]] for
92- (lat , lon ) in zip (lats , lons )]
93- data = {
94- "type" : "FeatureCollection" ,
95- "features" : [
96- {
97- "type" : "Feature" ,
98- "geometry" : {
99- "type" : "MultiPolygon" ,
100- "coordinates" : coordinates ,
101- },
102- "properties" : {"prop0" : "value0" }
103- },
104- ],
105- }
106-
107- mapc = folium .Map ([48. , 5. ], zoom_start = 6 )
108- mapc .add_plugin (plugins .GeoJson (data ))
109- mapc ._build_map ()
110-
111- open ('geojson_plugin_test2.json' , 'w' ).write (json .dumps (data ))
112- mapd = folium .Map ([48. , 5. ], zoom_start = 6 )
113- mapd .add_plugin (plugins .GeoJson (open ('geojson_plugin_test2.json' )))
114- mapd ._build_map ()
115-
11662 def test_timestamped_geo_json (self ):
11763 coordinates = [[[[lon - 8 * np .sin (theta ), - 47 + 6 * np .cos (theta )] for
11864 theta in np .linspace (0 , 2 * np .pi , 25 )],
0 commit comments