from folium.features import CustomIcon
m = folium.Map(location=[45.372, -121.6972], zoom_start=12, tiles='Stamen Terrain')
url = 'http://leafletjs.com/examples/custom-icons/{}'.format
icon_image = url('leaf-red.png')
shadow_image = url('leaf-shadow.png')
icon = CustomIcon(
icon_image,
icon_size=(38, 95),
icon_anchor=(22, 94),
shadow_image=shadow_image,
shadow_size=(50, 64),
shadow_anchor=(4, 62),
popup_anchor=(-3, -76)
)
marker = folium.Marker(
location=[45.3288, -121.6625],
icon=icon,
popup='Mt. Hood Meadows'
)
m.add_child(marker)
m.save(os.path.join('results', 'CustomIcon.html'))
m