Skip to content

Commit b7be357

Browse files
committed
fix deprecated apis
1 parent b94e61e commit b7be357

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

examples/base_map.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
# Standard OSM.
77
map_osm = folium.Map(location=[45.5236, -122.6750])
8-
map_osm.create_map(path='osm.html')
8+
map_osm.save(outfile='osm.html')
99

1010
# Stamen Toner.
1111
stamen = folium.Map(location=[45.5236, -122.6750], tiles='Stamen Toner',
1212
zoom_start=13)
13-
stamen.create_map(path='stamen_toner.html')
13+
stamen.save(outfile='stamen_toner.html')

examples/choropleth_counties.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def set_id(fips):
3838
key_on='feature.id',
3939
fill_color='YlOrRd', fill_opacity=0.7, line_opacity=0.3,
4040
topojson='objects.us_counties_20m')
41-
map_1.create_map(path='map_1.html')
41+
map_1.save(outfile='map_1.html')
4242

4343
# Unemployment with custom defined scale.
4444
map_2 = folium.Map(location=[40, -99], zoom_start=4)
@@ -49,7 +49,7 @@ def set_id(fips):
4949
fill_color='YlGnBu', line_opacity=0.3,
5050
legend_name='Unemployment Rate 2011 (%)',
5151
topojson='objects.us_counties_20m')
52-
map_2.create_map(path='map_2.html')
52+
map_2.save(outfile='map_2.html')
5353

5454
# Median Household income.
5555
map_3 = folium.Map(location=[40, -99], zoom_start=4)
@@ -59,4 +59,4 @@ def set_id(fips):
5959
fill_color='PuRd', line_opacity=0.3,
6060
legend_name='Median Household Income 2011 ($)',
6161
topojson='objects.us_counties_20m')
62-
map_3.create_map(path='map_3.html')
62+
map_3.save(outfile='map_3.html')

examples/choropleth_states.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
key_on='feature.id',
1919
fill_color='YlGn', fill_opacity=0.7, line_opacity=0.2,
2020
legend_name='Unemployment Rate (%)')
21-
states.create_map(path='us_state_map.html')
21+
states.save(outfile='us_state_map.html')
2222

2323
# Let's define our own scale and change the line opacity.
2424
states2 = folium.Map(location=[48, -102], zoom_start=3)
@@ -29,4 +29,4 @@
2929
fill_color='BuPu', fill_opacity=0.7, line_opacity=0.5,
3030
legend_name='Unemployment Rate (%)',
3131
reset=True)
32-
states2.create_map(path='us_state_map_2.html')
32+
states2.save(outfile='us_state_map_2.html')

examples/folium_vincent_markers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@
4545
radius=12, popup=(vis2, 'vis2.json'))
4646
buoy_map.polygon_marker(location=[46.216, -124.1280], fill_color='#43d9de',
4747
radius=12, popup=(vis3, 'vis3.json'))
48-
buoy_map.create_map(path='NOAA_buoys.html')
48+
buoy_map.save(outfile='NOAA_buoys.html')

examples/line_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
m = folium.Map(location=[41.9, -97.3], zoom_start=4)
2929
m.line(coordinates, line_color='#FF0000', line_weight=5)
3030

31-
m.create_map(path='line_example.html')
31+
m.save(outfile='line_example.html')

examples/markers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
tiles='Stamen Terrain')
99
map_1.simple_marker([45.3288, -121.6625], popup='Mt. Hood Meadows')
1010
map_1.simple_marker([45.3311, -121.7113], popup='Timberline Lodge')
11-
map_1.create_map(path='mthood.html')
11+
map_1.save(outfile='mthood.html')
1212

1313
# Circle Markers with Stamen Toner.
1414
map_2 = folium.Map(location=[45.5236, -122.6750], tiles='Stamen Toner',
@@ -17,20 +17,20 @@
1717
map_2.circle_marker(location=[45.5215, -122.6261], radius=500,
1818
popup='Laurelhurst Park', line_color='#3186cc',
1919
fill_color='#3186cc')
20-
map_2.create_map(path='portland.html')
20+
map_2.save(outfile='portland.html')
2121

2222
# Lat/Lng popovers.
2323
map_3 = folium.Map(location=[46.1991, -122.1889], tiles='Stamen Terrain',
2424
zoom_start=13)
2525
map_3.lat_lng_popover()
26-
map_3.create_map(path='sthelens.html')
26+
map_3.save(outfile='sthelens.html')
2727

2828
# Click for marker.
2929
map_4 = folium.Map(location=[46.8527, -121.7649], tiles='Stamen Terrain',
3030
zoom_start=13)
3131
map_4.simple_marker(location=[46.8354, -121.7325], popup='Camp Muir')
3232
map_4.click_for_marker(popup='Waypoint')
33-
map_4.create_map(path='mtrainier.html')
33+
map_4.save(outfile='mtrainier.html')
3434

3535
# Polygon markers.
3636
map_5 = folium.Map(location=[45.5236, -122.6750], zoom_start=13)
@@ -42,4 +42,4 @@
4242
fill_color='#769d96', num_sides=6, radius=10)
4343
map_5.polygon_marker(location=[45.5318, -122.6745], popup='Broadway Bridge',
4444
fill_color='#769d96', num_sides=8, radius=10)
45-
map_5.create_map(path='bridges.html')
45+
map_5.save(outfile='bridges.html')

0 commit comments

Comments
 (0)